No description
Find a file
Spencer Low b2d4949cee libbase_test: get it building for Windows
Add to whitelist.

For some reason, when compiling, parseint_test.cpp would encounter
errors like the following:

host cross C++: host_cross_libbase_test <= system/core/base/parseint_test.cpp
In file included from external/gtest/include/gtest/gtest.h:1929:0,
                 from system/core/base/parseint_test.cpp:19:
system/core/base/parseint_test.cpp: In member function ‘virtual void parseint_signed_smoke_Test::TestBody()’:
external/gtest/include/gtest/internal/gtest-internal.h:133:55: error: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Werror=conversion-null]
     (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
                                                       ^
external/gtest/include/gtest/gtest_pred_impl.h:77:52: note: in definition of macro ‘GTEST_ASSERT_’
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^
external/gtest/include/gtest/gtest_pred_impl.h:166:3: note: in expansion of macro ‘GTEST_PRED_FORMAT2_’
   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_FATAL_FAILURE_)
   ^
external/gtest/include/gtest/gtest.h:1993:3: note: in expansion of macro ‘ASSERT_PRED_FORMAT2’
   ASSERT_PRED_FORMAT2(::testing::internal:: \
   ^
external/gtest/include/gtest/gtest.h:1994:32: note: in expansion of macro ‘GTEST_IS_NULL_LITERAL_’
                       EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \
                                ^
external/gtest/include/gtest/gtest.h:2011:32: note: in expansion of macro ‘GTEST_ASSERT_EQ’
 # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
                                ^
system/core/base/parseint_test.cpp:23:3: note: in expansion of macro ‘ASSERT_EQ’
   ASSERT_EQ(false, android::base::ParseInt("x", &i));
   ^

For whatever reason, the gcc for Windows isn't handling the template
metaprogramming correctly, so to work-around the issue, I
search-and-replaced "ASSERT_EQ(false, " to "ASSERT_FALSE(" and
"ASSERT_EQ(true, " to "ASSERT_TRUE(" and that seems to compile just fine
for Linux and Windows (and the tests pass on both platforms).

Change-Id: I05132909d1f4b18afff23139652a218649689f2d
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-09-11 20:01:29 -07:00
adb adb: fix shell_service_protocol_test for Windows. 2015-09-11 18:28:27 -07:00
adf Adf: Remove unused variable 2015-07-27 22:08:16 -07:00
base libbase_test: get it building for Windows 2015-09-11 20:01:29 -07:00
cpio makebootfs: use libcutils shared libraries 2015-04-15 10:32:19 -07:00
crash_reporter crash_reporter: Fix crash_sender 2015-09-09 17:06:33 -07:00
debuggerd bundle init.rc contents with its service 2015-08-21 10:14:43 -07:00
fastboot Remove USE_MINGW/CYGWIN; Whitelist windows modules 2015-09-02 17:10:35 -07:00
fs_mgr fs_mgr: Fix ENOMEM behavior when dealing with slotselect. 2015-09-09 18:03:13 -04:00
healthd healthd: Adds cycle_count, current_now and full_charge properties. 2015-08-24 13:01:16 -07:00
include Use CAP_MASK_LONG for file capabilities. 2015-09-02 17:18:44 -07:00
init init: Update readme.txt to reflect recent changes to init. 2015-09-01 15:32:33 -07:00
libbacktrace Add a logging handler on timeout. 2015-09-03 12:27:57 -07:00
libcutils Merge "Use CAP_MASK_LONG for file capabilities." 2015-09-03 15:48:01 +00:00
libdiskconfig am eb075e28: am c8179498: am 2f62edf7: Merge "libdiskconfig: Turn on -Werror" 2014-05-21 21:19:27 +00:00
libion Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed. 2015-04-02 14:31:07 -07:00
liblog Ensure that libbase and liblog can be built for Windows. 2015-09-11 11:39:16 -07:00
libmemtrack Add missing <malloc.h> and <string.h> includes. 2015-01-28 11:37:57 -08:00
libmincrypt Enable clang compilation. 2015-05-14 10:53:48 -07:00
libnativebridge Use __ANDROID__ instead of HAVE_ANDROID_OS. 2015-07-30 09:33:43 -07:00
libnetutils Use __ANDROID__ instead of HAVE_ANDROID_OS. 2015-07-30 09:33:43 -07:00
libpixelflinger To compile with llvm integrated assembler. 2015-08-21 15:58:26 -07:00
libprocessgroup Remove uses of libcxx.mk. 2015-03-27 11:24:04 -07:00
libsparse Remove USE_MINGW/CYGWIN; Whitelist windows modules 2015-09-02 17:10:35 -07:00
libsuspend Libsuspend: Remove unused variable 2014-11-24 18:53:44 -08:00
libsync Remove LOCAL_ADDITIONAL_DEPENDENCIES in cases where it's not needed. 2015-04-02 14:31:07 -07:00
libsysutils Add missing <malloc.h> and <string.h> includes. 2015-01-28 11:37:57 -08:00
libusbhost am 0d8943c2: am e4c5b614: Merge "libusbhost: Fix IOCTL call during usb_request_cancel" 2014-08-12 21:05:43 +00:00
libutils Remove USE_MINGW/CYGWIN; Whitelist windows modules 2015-09-02 17:10:35 -07:00
libziparchive Remove USE_MINGW/CYGWIN; Whitelist windows modules 2015-09-02 17:10:35 -07:00
lmkd bundle init.rc contents with its service 2015-08-21 10:14:43 -07:00
logcat bundle init.rc contents with its service 2015-08-21 10:14:43 -07:00
logd logd: worst uid record watermark part five 2015-09-10 08:43:03 -07:00
logwrapper Add FORK_EXECVP_OPTION_CAPTURE_OUTPUT to logwrap.h 2015-08-21 17:14:59 -07:00
metricsd metrics: Add an option to metrics_client to dump the logs cache. 2015-09-09 15:23:24 -07:00
mkbootimg mkbootimg: misc typo fixes 2015-06-04 09:59:01 -07:00
reboot reboot: Turn on -Werror 2014-05-21 12:58:38 -07:00
rootdir Merge "move uncrypt from init.rc to uncrypt.rc" 2015-09-04 16:51:30 +00:00
run-as package missing include for string.h 2015-04-01 11:15:37 -07:00
sdcard Move sdcard off PAGESIZE and onto PAGE_SIZE. 2015-07-28 16:36:47 -07:00
toolbox Lose lsof to toybox. 2015-09-11 10:58:21 -07:00
tzdatacheck Executable to run on boot that removes old tzdata if needed 2015-04-13 11:38:32 +01:00
.gitignore Ignore adb/*.pyc files 2015-08-11 12:59:58 -07:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:12:32 -07:00
CleanSpec.mk Add a CleanSpec for grep/toolbox. 2015-03-22 18:04:54 -07:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
NOTICE Fix omission in NOTICE file. 2013-07-30 13:56:55 -07:00