| Index: third_party/WebKit/Source/wtf/AssertionsTest.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/AssertionsTest.cpp b/third_party/WebKit/Source/wtf/AssertionsTest.cpp
|
| index 3da4ee23a9aa9269c9ef3dbf66c4c51c33b6b542..76fc8013ab59d8856819d39ad99c94e794bb90c2 100644
|
| --- a/third_party/WebKit/Source/wtf/AssertionsTest.cpp
|
| +++ b/third_party/WebKit/Source/wtf/AssertionsTest.cpp
|
| @@ -8,9 +8,31 @@
|
| #include "wtf/text/StringBuilder.h"
|
| #include <stdio.h>
|
|
|
| -#if !LOG_DISABLED
|
| namespace WTF {
|
|
|
| +TEST(AssertionsTest, Assertions) {
|
| + ASSERT(true);
|
| +#if ENABLE(ASSERT)
|
| + EXPECT_DEATH_IF_SUPPORTED(ASSERT(false), "");
|
| + EXPECT_DEATH_IF_SUPPORTED(ASSERT_NOT_REACHED(), "");
|
| +#endif
|
| +
|
| + RELEASE_ASSERT(true);
|
| + EXPECT_DEATH_IF_SUPPORTED(RELEASE_ASSERT(false), "");
|
| +
|
| + SECURITY_DCHECK(true);
|
| +#if ENABLE(SECURITY_ASSERT)
|
| + EXPECT_DEATH_IF_SUPPORTED(SECURITY_DCHECK(false), "");
|
| +#endif
|
| +
|
| + SECURITY_CHECK(true);
|
| + EXPECT_DEATH_IF_SUPPORTED(SECURITY_CHECK(false), "");
|
| +
|
| + EXPECT_DEATH_IF_SUPPORTED(CRASH(), "");
|
| + EXPECT_DEATH_IF_SUPPORTED(IMMEDIATE_CRASH(), "");
|
| +};
|
| +
|
| +#if !LOG_DISABLED
|
| static const int kPrinterBufferSize = 256;
|
| static char gBuffer[kPrinterBufferSize];
|
| static StringBuilder gBuilder;
|
| @@ -45,6 +67,6 @@ TEST(AssertionsTest, ScopedLogger) {
|
| ")\n",
|
| gBuilder.toString());
|
| };
|
| +#endif // !LOG_DISABLED
|
|
|
| } // namespace WTF
|
| -#endif // !LOG_DISABLED
|
|
|