/system/core/adb/ |
adb_utils_test.cpp | 28 ASSERT_EQ(R"('')", escape_arg("")); 30 ASSERT_EQ(R"('abc')", escape_arg("abc")); 32 ASSERT_EQ(R"(' abc')", escape_arg(" abc")); 33 ASSERT_EQ(R"(''\''abc')", escape_arg("'abc")); 34 ASSERT_EQ(R"('"abc')", escape_arg("\"abc")); 35 ASSERT_EQ(R"('\abc')", escape_arg("\\abc")); 36 ASSERT_EQ(R"('(abc')", escape_arg("(abc")); 37 ASSERT_EQ(R"(')abc')", escape_arg(")abc")); 39 ASSERT_EQ(R"('abc abc')", escape_arg("abc abc")); 40 ASSERT_EQ(R"('abc'\''abc')", escape_arg("abc'abc")) [all...] |
/bionic/tests/ |
semaphore_test.cpp | 32 ASSERT_EQ(0, sem_init(&s, 0, 0)); 33 ASSERT_EQ(0, sem_init(&s, 0, 1)); 34 ASSERT_EQ(0, sem_init(&s, 0, 123)); 38 ASSERT_EQ(-1, sem_init(&s, 0, -1)); 39 ASSERT_EQ(EINVAL, errno); 41 ASSERT_EQ(SEM_VALUE_MAX, sysconf(_SC_SEM_VALUE_MAX)); 44 ASSERT_EQ(0, sem_init(&s, 0, SEM_VALUE_MAX)); 48 ASSERT_EQ(-1, sem_init(&s, 0, SEM_VALUE_MAX + 1)); 49 ASSERT_EQ(EINVAL, errno); 51 ASSERT_EQ(0, sem_destroy(&s)) [all...] |
sys_xattr_test.cpp | 27 ASSERT_EQ(0, setxattr(tf.filename, "user.foo", "bar", 4, 0)); 28 ASSERT_EQ(4, getxattr(tf.filename, "user.foo", buf, sizeof(buf))); 31 ASSERT_EQ(4, lgetxattr(tf.filename, "user.foo", buf, sizeof(buf))); 38 ASSERT_EQ(0, fsetxattr(tf.fd, "user.foo", "bar", 4, 0)); 39 ASSERT_EQ(4, fgetxattr(tf.fd, "user.foo", buf, sizeof(buf))); 46 ASSERT_EQ(0, fsetxattr(tf.fd, "user.foo", "", 0, 0)); 47 ASSERT_EQ(0, fgetxattr(tf.fd, "user.foo", buf, sizeof(buf))); 53 ASSERT_EQ(0, fsetxattr(tf.fd, "user.foo", "01234567890123456789", 21, 0)); 54 ASSERT_EQ(-1, fgetxattr(tf.fd, "user.foo", buf, sizeof(buf))); 55 ASSERT_EQ(ERANGE, errno) [all...] |
sys_stat_test.cpp | 38 ASSERT_EQ(0, futimens(fd, times)) << strerror(errno); 41 ASSERT_EQ(0, fstat(fd, &sb)); 42 ASSERT_EQ(times[0].tv_sec, static_cast<long>(sb.st_atime)); 43 ASSERT_EQ(times[1].tv_sec, static_cast<long>(sb.st_mtime)); 54 ASSERT_EQ(-1, futimens(-1, times)); 55 ASSERT_EQ(EBADF, errno); 60 ASSERT_EQ(-1, mkfifo("/", 0666)); 61 ASSERT_EQ(EEXIST, errno); 66 ASSERT_EQ(-1, mkfifoat(-2, "x", 0666)); 67 ASSERT_EQ(EBADF, errno) [all...] |
pthread_test.cpp | 47 ASSERT_EQ(0, pthread_key_create(&key, NULL)); 48 ASSERT_EQ(0, pthread_key_delete(key)); 50 ASSERT_EQ(EINVAL, pthread_key_delete(key)); 60 ASSERT_EQ(sysconf_max, PTHREAD_KEYS_MAX); 78 ASSERT_EQ(0, pthread_key_create(&key, NULL)) << i << " of " << nkeys; 80 ASSERT_EQ(0, pthread_setspecific(key, reinterpret_cast<void*>(i))); 84 ASSERT_EQ(reinterpret_cast<void*>(i), pthread_getspecific(keys.back())); 87 ASSERT_EQ(0, pthread_key_delete(key)); 115 ASSERT_EQ(EAGAIN, rv); 121 ASSERT_EQ(0, pthread_key_create(&key, NULL)) [all...] |
stdint_test.cpp | 22 ASSERT_EQ(1U, sizeof(int_fast8_t)); 23 ASSERT_EQ(8U, sizeof(int_fast64_t)); 24 ASSERT_EQ(1U, sizeof(uint_fast8_t)); 25 ASSERT_EQ(8U, sizeof(uint_fast64_t)); 27 ASSERT_EQ(8U, sizeof(int_fast16_t)); 28 ASSERT_EQ(8U, sizeof(int_fast32_t)); 29 ASSERT_EQ(8U, sizeof(uint_fast16_t)); 30 ASSERT_EQ(8U, sizeof(uint_fast32_t)); 32 ASSERT_EQ(4U, sizeof(int_fast16_t)); 33 ASSERT_EQ(4U, sizeof(int_fast32_t)) [all...] |
sys_types_test.cpp | 23 ASSERT_EQ(4U, sizeof(gid_t)); 24 ASSERT_EQ(4U, sizeof(pid_t)); 25 ASSERT_EQ(4U, sizeof(uid_t)); 27 ASSERT_EQ(4U, sizeof(id_t)); 32 ASSERT_EQ(8U, sizeof(dev_t)); 33 ASSERT_EQ(8U, sizeof(off_t)); 34 ASSERT_EQ(8U, sizeof(time_t)); 36 ASSERT_EQ(4U, sizeof(dev_t)); 37 ASSERT_EQ(4U, sizeof(off_t)); 38 ASSERT_EQ(4U, sizeof(time_t)) [all...] |
sys_resource_test.cpp | 23 ASSERT_EQ(sizeof(rlimit), sizeof(rlimit64)); 24 ASSERT_EQ(8U, sizeof(rlim_t)); 27 ASSERT_EQ(4U, sizeof(rlim_t)); 34 ASSERT_EQ(0, getrlimit(RLIMIT_CORE, &l32_)); 35 ASSERT_EQ(0, getrlimit64(RLIMIT_CORE, &l64_)); 36 ASSERT_EQ(0, prlimit64(0, RLIMIT_CORE, NULL, &pr_l64_)); 48 ASSERT_EQ(0, getrlimit(RLIMIT_CORE, &l32_)); 49 ASSERT_EQ(0, getrlimit64(RLIMIT_CORE, &l64_)); 50 ASSERT_EQ(0, prlimit64(0, RLIMIT_CORE, NULL, &pr_l64_)); 51 ASSERT_EQ(l64_.rlim_cur, pr_l64_.rlim_cur) [all...] |
complex_test.cpp | 29 ASSERT_EQ(0.0, cabs(0)); 34 ASSERT_EQ(0.0, cabsf(0)); 39 ASSERT_EQ(0.0, cabsl(0)); 44 ASSERT_EQ(M_PI/2.0, cacos(0.0)); 49 ASSERT_EQ(static_cast<float>(M_PI)/2.0f, cacosf(0.0)); 54 ASSERT_EQ(0.0, cacosh(1.0)); 59 ASSERT_EQ(0.0, cacoshf(1.0)); 64 ASSERT_EQ(0.0, carg(0)); 69 ASSERT_EQ(0.0, cargf(0)); 74 ASSERT_EQ(0.0, cargl(0)) [all...] |
strings_test.cpp | 24 ASSERT_EQ( 0, ffs(0x00000000)); 25 ASSERT_EQ( 1, ffs(0x00000001)); 26 ASSERT_EQ( 6, ffs(0x00000020)); 27 ASSERT_EQ(11, ffs(0x00000400)); 28 ASSERT_EQ(16, ffs(0x00008000)); 29 ASSERT_EQ(17, ffs(0x00010000)); 30 ASSERT_EQ(22, ffs(0x00200000)); 31 ASSERT_EQ(27, ffs(0x04000000)); 32 ASSERT_EQ(32, ffs(0x80000000)); 36 ASSERT_EQ(0, strcasecmp("hello", "HELLO")) [all...] |
stdio_ext_test.cpp | 38 ASSERT_EQ(0U, __fbufsize(fp)); 43 ASSERT_EQ(1024U, __fbufsize(fp)); 45 ASSERT_EQ(0, setvbuf(fp, buf, _IOFBF, 1)); 46 ASSERT_EQ(1U, __fbufsize(fp)); 48 ASSERT_EQ(0, setvbuf(fp, buf, _IOFBF, 8)); 49 ASSERT_EQ(8U, __fbufsize(fp)); 60 ASSERT_EQ(0, setvbuf(fp, buf, _IOLBF, sizeof(buf))); 69 ASSERT_EQ(0U, __fpending(fp)); 70 ASSERT_EQ('x', fputc('x', fp)); 71 ASSERT_EQ(1U, __fpending(fp)) [all...] |
search_test.cpp | 34 ASSERT_EQ(nullptr, lfind(&needle, xs, &x_size, sizeof(xs[0]), int_cmp)); 35 ASSERT_EQ(0U, x_size); 38 ASSERT_EQ(&xs[0], lsearch(&needle, xs, &x_size, sizeof(xs[0]), int_cmp)); 39 ASSERT_EQ(2, xs[0]); 40 ASSERT_EQ(1U, x_size); 43 ASSERT_EQ(&xs[0], lfind(&needle, xs, &x_size, sizeof(xs[0]), int_cmp)); 44 ASSERT_EQ(1U, x_size); 47 ASSERT_EQ(&xs[0], lsearch(&needle, xs, &x_size, sizeof(xs[0]), int_cmp)); 48 ASSERT_EQ(1U, x_size); 86 ASSERT_EQ(nullptr, tfind(&n1, &root, node_cmp)) [all...] |
fortify_test.cpp | 671 ASSERT_EQ(buf, res); 672 ASSERT_EQ('a', buf[0]); 673 ASSERT_EQ('0', buf[1]); 674 ASSERT_EQ('1', buf[2]); 675 ASSERT_EQ('2', buf[3]); 676 ASSERT_EQ('3', buf[4]); 677 ASSERT_EQ('4', buf[5]); 678 ASSERT_EQ('\0', buf[6]); 679 ASSERT_EQ('A', buf[7]); 680 ASSERT_EQ('A', buf[8]) [all...] |
fcntl_test.cpp | 30 ASSERT_EQ(0, flags & FD_CLOEXEC); 33 ASSERT_EQ(0, rc); 37 ASSERT_EQ(FD_CLOEXEC, flags & FD_CLOEXEC); 67 ASSERT_EQ(-1, creat("", 0666)); 68 ASSERT_EQ(ENOENT, errno); 69 ASSERT_EQ(-1, creat64("", 0666)); 70 ASSERT_EQ(ENOENT, errno); 100 ASSERT_EQ(-1, fallocate(tf.fd, 0, 0, -1)); 101 ASSERT_EQ(EINVAL, errno); 104 ASSERT_EQ(-1, fallocate64(tf.fd, 0, 0, -1)) [all...] |
sys_time_test.cpp | 30 ASSERT_EQ(-1, utimes("/", tv)); 31 ASSERT_EQ(EINVAL, errno); 33 ASSERT_EQ(-1, utimes("/", tv)); 34 ASSERT_EQ(EINVAL, errno); 38 ASSERT_EQ(-1, utimes("/", tv)); 39 ASSERT_EQ(EINVAL, errno); 41 ASSERT_EQ(-1, utimes("/", tv)); 42 ASSERT_EQ(EINVAL, errno); 48 ASSERT_EQ(0, utimes(tf.filename, NULL)); 54 ASSERT_EQ(0, gettimeofday(&tv1, NULL)) [all...] |
/external/clang/unittests/AST/ |
CommentLexer.cpp | 87 ASSERT_EQ(0U, Toks.size()); 100 ASSERT_EQ(1U, Toks.size()); 102 ASSERT_EQ(tok::newline, Toks[0].getKind()); 116 ASSERT_EQ(2U, Toks.size()); 118 ASSERT_EQ(tok::newline, Toks[0].getKind()); 119 ASSERT_EQ(tok::newline, Toks[1].getKind()); 135 ASSERT_EQ(2U, Toks.size()); 137 ASSERT_EQ(tok::text, Toks[0].getKind()); 138 ASSERT_EQ(StringRef(" Meow"), Toks[0].getText()); 140 ASSERT_EQ(tok::newline, Toks[1].getKind()) [all...] |
/external/google-breakpad/src/common/linux/ |
linux_libc_support_unittest.cc | 42 ASSERT_EQ(strlen(test_data[i]), my_strlen(test_data[i])); 67 ASSERT_EQ(my_strcmp(test_data[i*2], test_data[i*2 + 1]), libc_result); 81 ASSERT_EQ(result, 0); 83 ASSERT_EQ(result, 1); 85 ASSERT_EQ(result, 12); 87 ASSERT_EQ(result, 123); 89 ASSERT_EQ(result, 123); 93 ASSERT_EQ(my_uint_len(0), 1U); 94 ASSERT_EQ(my_uint_len(2), 1U); 95 ASSERT_EQ(my_uint_len(5), 1U) [all...] |
/frameworks/compile/mclinker/unittests/ |
LEB128Test.cpp | 48 ASSERT_EQ(buffer[0], 2); 49 ASSERT_EQ(result, buffer + 1); 54 ASSERT_EQ(buffer[0], 127); 55 ASSERT_EQ(result, buffer + 1); 60 ASSERT_EQ(buffer[0], 0 + 0x80); 61 ASSERT_EQ(buffer[1], 1); 62 ASSERT_EQ(result, buffer + 2); 67 ASSERT_EQ(buffer[0], 1 + 0x80); 68 ASSERT_EQ(buffer[1], 1); 69 ASSERT_EQ(result, buffer + 2) [all...] |
/frameworks/native/libs/input/tests/ |
InputEvent_test.cpp | 40 ASSERT_EQ(0ULL, coords.bits); 49 ASSERT_EQ(0, coords.getAxisValue(0)) 51 ASSERT_EQ(0, coords.getAxisValue(1)) 55 ASSERT_EQ(OK, coords.setAxisValue(1, 5)); 56 ASSERT_EQ(5, coords.values[0]); 57 ASSERT_EQ(0x4000000000000000ULL, coords.bits); 59 ASSERT_EQ(0, coords.getAxisValue(0)) 61 ASSERT_EQ(5, coords.getAxisValue(1)) 65 ASSERT_EQ(OK, coords.setAxisValue(3, 2)); 66 ASSERT_EQ(0x5000000000000000ULL, coords.bits) [all...] |
/external/google-breakpad/src/processor/ |
pathname_stripper_unittest.cc | 41 #define ASSERT_EQ(e1, e2) ASSERT_TRUE((e1) == (e2)) 48 ASSERT_EQ(PathnameStripper::File("/dir/file"), "file"); 49 ASSERT_EQ(PathnameStripper::File("\\dir\\file"), "file"); 50 ASSERT_EQ(PathnameStripper::File("/dir\\file"), "file"); 51 ASSERT_EQ(PathnameStripper::File("\\dir/file"), "file"); 52 ASSERT_EQ(PathnameStripper::File("dir/file"), "file"); 53 ASSERT_EQ(PathnameStripper::File("dir\\file"), "file"); 54 ASSERT_EQ(PathnameStripper::File("dir/\\file"), "file"); 55 ASSERT_EQ(PathnameStripper::File("dir\\/file"), "file"); 56 ASSERT_EQ(PathnameStripper::File("file"), "file") [all...] |
/frameworks/native/opengl/tests/EGLTest/ |
egl_cache_test.cpp | 46 ASSERT_EQ(0, mCache->getBlob("abcd", 4, buf, 4)); 47 ASSERT_EQ(0xee, buf[0]); 48 ASSERT_EQ(0xee, buf[1]); 49 ASSERT_EQ(0xee, buf[2]); 50 ASSERT_EQ(0xee, buf[3]); 57 ASSERT_EQ(4, mCache->getBlob("abcd", 4, buf, 4)); 58 ASSERT_EQ('e', buf[0]); 59 ASSERT_EQ('f', buf[1]); 60 ASSERT_EQ('g', buf[2]); 61 ASSERT_EQ('h', buf[3]) [all...] |
/frameworks/native/libs/gui/tests/ |
StreamSplitter_test.cpp | 91 ASSERT_EQ(OK, outputConsumer->consumerConnect(new DummyListener, false)); 95 ASSERT_EQ(OK, status); 96 ASSERT_EQ(OK, splitter->addOutput(outputProducer)); 99 ASSERT_EQ(OK, inputProducer->connect(new DummyProducerListener, 105 ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION, 108 ASSERT_EQ(OK, inputProducer->requestBuffer(slot, &buffer)); 111 ASSERT_EQ(OK, buffer->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN, 114 ASSERT_EQ(OK, buffer->unlock()); 120 ASSERT_EQ(OK, inputProducer->queueBuffer(slot, qbInput, &qbOutput)); 123 ASSERT_EQ(OK, outputConsumer->acquireBuffer(&item, 0)) [all...] |
SurfaceTextureMultiContextGL_test.cpp | 33 ASSERT_EQ(OK, mST->updateTexImage()); 38 ASSERT_EQ(EGL_SUCCESS, eglGetError()); 39 ASSERT_EQ(INVALID_OPERATION, mST->updateTexImage()); 47 ASSERT_EQ(OK, mST->updateTexImage()); 50 ASSERT_EQ(OK, mST->detachFromContext()); 62 ASSERT_EQ(OK, mST->updateTexImage()); 66 ASSERT_EQ(OK, mST->detachFromContext()); 77 ASSERT_EQ(OK, mST->updateTexImage()); 81 ASSERT_EQ(NO_INIT, mST->detachFromContext()); 89 ASSERT_EQ(OK, mST->updateTexImage()) [all...] |
BufferQueue_test.cpp | 59 ASSERT_EQ(OK, mProducer->query(NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, 107 ASSERT_EQ(OK, mConsumer->consumerConnect(dc, false)); 109 ASSERT_EQ(OK, 115 ASSERT_EQ(IGraphicBufferProducer::BUFFER_NEEDS_REALLOCATION, 118 ASSERT_EQ(OK, mProducer->requestBuffer(slot, &buffer)); 121 ASSERT_EQ(OK, buffer->lock(GraphicBuffer::USAGE_SW_WRITE_OFTEN, 124 ASSERT_EQ(OK, buffer->unlock()); 129 ASSERT_EQ(OK, mProducer->queueBuffer(slot, input, &output)); 132 ASSERT_EQ(OK, mConsumer->acquireBuffer(&item, 0)); 135 ASSERT_EQ(OK, item.mGraphicBuffer->lock(GraphicBuffer::USAGE_SW_READ_OFTEN [all...] |
/external/google-tv-pairing-protocol/cpp/tests/polo/util/ |
poloutiltest.cc | 24 ASSERT_EQ(std::string("AABBCCDD"), result); 30 ASSERT_EQ(std::string("BBCCDD"), result); 36 ASSERT_EQ(4, length); 37 ASSERT_EQ(0xAA, bytes[0]); 38 ASSERT_EQ(0xBB, bytes[1]); 39 ASSERT_EQ(0xCC, bytes[2]); 40 ASSERT_EQ(0xDD, bytes[3]); 47 ASSERT_EQ(0xAA, bytes[0]); 48 ASSERT_EQ(0xBB, bytes[1]); 49 ASSERT_EQ(0xCC, bytes[2]) [all...] |