diff options
author | Alex Deymo <deymo@google.com> | 2016-01-06 11:54:03 -0800 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2016-01-06 11:54:03 -0800 |
commit | 27f8f9440e012927c1ff2831da1a0d7478559c5c (patch) | |
tree | d1a9a7eee79ca5289d44ef8a17175f03d7d97566 | |
parent | f68e898423cfeeb6fc5efdd2af2a9b2d19a9d2ff (diff) | |
download | platform_external_libbrillo-27f8f9440e012927c1ff2831da1a0d7478559c5c.tar.gz platform_external_libbrillo-27f8f9440e012927c1ff2831da1a0d7478559c5c.tar.bz2 platform_external_libbrillo-27f8f9440e012927c1ff2831da1a0d7478559c5c.zip |
Disable TypeTag tests when USE_RTTI_FOR_TYPE_TAGS is defined.brillo-m9-releasebrillo-m9-dev
Tests using tags from the __PRETTY_FUNCTION__ don't work when using
RTTI to get the type name since the format is different.
This CL disables those tests as they check the proper parsing of a
function not used when USE_RTTI_FOR_TYPE_TAGS is defined.
Bug: 26292405
TEST=FEATURES=test emerge-link libbrillog
Change-Id: I7c3383359bc16faebd493f3da003663916be390d
-rw-r--r-- | brillo/type_name_undecorate_unittest.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/brillo/type_name_undecorate_unittest.cc b/brillo/type_name_undecorate_unittest.cc index 04c1c5e..604c0fb 100644 --- a/brillo/type_name_undecorate_unittest.cc +++ b/brillo/type_name_undecorate_unittest.cc @@ -9,6 +9,9 @@ namespace brillo { +// Tests using tags from the __PRETTY_FUNCTION__ don't work when using RTTI +// to get the type name. +#ifndef USE_RTTI_FOR_TYPE_TAGS TEST(TypeTags, GetTypeTag) { EXPECT_STREQ("const char *brillo::GetTypeTag() [T = int]", GetTypeTag<int>()); EXPECT_STREQ("const char *brillo::GetTypeTag() [T = std::__1::map<std::__1::" @@ -22,6 +25,7 @@ TEST(TypeTags, GetTypeTag) { EXPECT_STREQ("const char *brillo::GetTypeTag() [T = int []]", GetTypeTag<int[]>()); } +#endif // USE_RTTI_FOR_TYPE_TAGS TEST(TypeDecoration, UndecorateTypeName) { EXPECT_EQ("int", UndecorateTypeName("i")); @@ -31,6 +35,7 @@ TEST(TypeDecoration, UndecorateTypeName) { UndecorateTypeName("_ZNSt3__19to_stringEi")); } +#ifndef USE_RTTI_FOR_TYPE_TAGS TEST(TypeDecoration, GetUndecoratedTypeNameForTag) { EXPECT_EQ("int", GetUndecoratedTypeNameForTag( @@ -57,5 +62,6 @@ TEST(TypeDecoration, GetUndecoratedTypeName) { "std::__1::allocator<std::__1::pair<const int, double> > >", (GetUndecoratedTypeName<std::map<int, double>>())); } +#endif // USE_RTTI_FOR_TYPE_TAGS } // namespace brillo |