diff options
author | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-09-26 16:08:30 +0000 |
---|---|---|
committer | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-09-26 16:08:30 +0000 |
commit | 64cdcb69b28fc26e78d95c574187f7dd9830c84c (patch) | |
tree | 68f49941b72ce8f866c4f762cb3043504804800f /include/gtest/internal/gtest-type-util.h | |
parent | e79c3ccb73d68543e8ad98d69179dee74abff7ab (diff) | |
download | googletest-64cdcb69b28fc26e78d95c574187f7dd9830c84c.tar.gz googletest-64cdcb69b28fc26e78d95c574187f7dd9830c84c.tar.bz2 googletest-64cdcb69b28fc26e78d95c574187f7dd9830c84c.zip |
Lots of changes:
* changes the XML report format to match JUnit/Ant's.
* improves file path handling.
* allows the user to disable RTTI using the GTEST_HAS_RTTI macro.
* makes the code compile with -Wswitch-enum.
Diffstat (limited to 'include/gtest/internal/gtest-type-util.h')
-rw-r--r-- | include/gtest/internal/gtest-type-util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-type-util.h b/include/gtest/internal/gtest-type-util.h index 8b56082b..815da4ba 100644 --- a/include/gtest/internal/gtest-type-util.h +++ b/include/gtest/internal/gtest-type-util.h @@ -71,6 +71,8 @@ struct AssertTypeEq<T, T> { // GetTypeName<T>() returns a human-readable name of type T. template <typename T> String GetTypeName() { +#if GTEST_HAS_RTTI + const char* const name = typeid(T).name(); #ifdef __GNUC__ int status = 0; @@ -83,6 +85,10 @@ String GetTypeName() { #else return name; #endif // __GNUC__ + +#else + return "<type>"; +#endif // GTEST_HAS_RTTI } // A unique type used as the default value for the arguments of class |