summaryrefslogtreecommitdiff
path: root/chromium/testing/gtest/include/gtest/internal/gtest-port.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/testing/gtest/include/gtest/internal/gtest-port.h')
-rw-r--r--chromium/testing/gtest/include/gtest/internal/gtest-port.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/chromium/testing/gtest/include/gtest/internal/gtest-port.h b/chromium/testing/gtest/include/gtest/internal/gtest-port.h
index c79f12a29ed..dc4fe0cb6b8 100644
--- a/chromium/testing/gtest/include/gtest/internal/gtest-port.h
+++ b/chromium/testing/gtest/include/gtest/internal/gtest-port.h
@@ -32,6 +32,10 @@
// Low-level types and utilities for porting Google Test to various
// platforms. They are subject to change without notice. DO NOT USE
// THEM IN USER CODE.
+//
+// This file is fundamental to Google Test. All other Google Test source
+// files are expected to #include this. Therefore, it cannot #include
+// any other Google Test header.
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
@@ -784,6 +788,11 @@ class Message;
namespace internal {
+// A secret type that Google Test users don't know about. It has no
+// definition on purpose. Therefore it's impossible to create a
+// Secret object, which is what we want.
+class Secret;
+
// The GTEST_COMPILE_ASSERT_ macro can be used to verify that a compile time
// expression is true. For example, you could use it to verify the
// size of a static array:
@@ -804,8 +813,8 @@ struct CompileAssert {
};
#define GTEST_COMPILE_ASSERT_(expr, msg) \
- typedef ::testing::internal::CompileAssert<(bool(expr))> \
- msg[bool(expr) ? 1 : -1]
+ typedef ::testing::internal::CompileAssert<(static_cast<bool>(expr))> \
+ msg[static_cast<bool>(expr) ? 1 : -1] GTEST_ATTRIBUTE_UNUSED_
// Implementation details of GTEST_COMPILE_ASSERT_:
//