Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "absl/flags/config.h"
00016
00017 #ifdef __APPLE__
00018 #include <TargetConditionals.h>
00019 #endif
00020
00021 #include "gtest/gtest.h"
00022
00023 #ifndef ABSL_FLAGS_STRIP_NAMES
00024 #error ABSL_FLAGS_STRIP_NAMES is not defined
00025 #endif
00026
00027 #ifndef ABSL_FLAGS_STRIP_HELP
00028 #error ABSL_FLAGS_STRIP_HELP is not defined
00029 #endif
00030
00031 namespace {
00032
00033
00034
00035
00036 TEST(FlagsConfigTest, Test) {
00037 #if defined(__ANDROID__)
00038 EXPECT_EQ(ABSL_FLAGS_STRIP_NAMES, 1);
00039 EXPECT_EQ(ABSL_FLAGS_STRIP_HELP, 1);
00040 #elif defined(__myriad2__)
00041 EXPECT_EQ(ABSL_FLAGS_STRIP_NAMES, 0);
00042 EXPECT_EQ(ABSL_FLAGS_STRIP_HELP, 0);
00043 #elif defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
00044 EXPECT_EQ(ABSL_FLAGS_STRIP_NAMES, 1);
00045 EXPECT_EQ(ABSL_FLAGS_STRIP_HELP, 1);
00046 #elif defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED
00047 EXPECT_EQ(ABSL_FLAGS_STRIP_NAMES, 1);
00048 EXPECT_EQ(ABSL_FLAGS_STRIP_HELP, 1);
00049 #elif defined(__APPLE__)
00050 EXPECT_EQ(ABSL_FLAGS_STRIP_NAMES, 0);
00051 EXPECT_EQ(ABSL_FLAGS_STRIP_HELP, 0);
00052 #elif defined(_WIN32)
00053 EXPECT_EQ(ABSL_FLAGS_STRIP_NAMES, 0);
00054 EXPECT_EQ(ABSL_FLAGS_STRIP_HELP, 0);
00055 #elif defined(__linux__)
00056 EXPECT_EQ(ABSL_FLAGS_STRIP_NAMES, 0);
00057 EXPECT_EQ(ABSL_FLAGS_STRIP_HELP, 0);
00058 #endif
00059 }
00060
00061 }