Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: Source/platform/heap/HeapTest.cpp

Issue 813883002: replace COMPILE_ASSERT with static_assert in platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: final fixups Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/HeapTest.cpp
diff --git a/Source/platform/heap/HeapTest.cpp b/Source/platform/heap/HeapTest.cpp
index c309fdb70af9b4e1ce0c6b3ec527e30719ca312f..8da0ac727ca1e21275241b1f02f6109db93b9ac1 100644
--- a/Source/platform/heap/HeapTest.cpp
+++ b/Source/platform/heap/HeapTest.cpp
@@ -5284,26 +5284,26 @@ class TraceTypeNonEagerly4 : public TraceTypeNonEagerly3 { };
TEST(HeapTest, TraceTypesEagerly)
{
- COMPILE_ASSERT(TraceEagerlyTrait<TraceTypeEagerly1>::value, ShouldBeTrue);
- COMPILE_ASSERT(TraceEagerlyTrait<Member<TraceTypeEagerly1>>::value, ShouldBeTrue);
- COMPILE_ASSERT(TraceEagerlyTrait<WeakMember<TraceTypeEagerly1>>::value, ShouldBeTrue);
- COMPILE_ASSERT(TraceEagerlyTrait<RawPtr<TraceTypeEagerly1>>::value == MARKER_EAGER_TRACING, ShouldBeTrue);
- COMPILE_ASSERT(TraceEagerlyTrait<HeapVector<Member<TraceTypeEagerly1>>>::value, ShouldBeTrue);
- COMPILE_ASSERT(TraceEagerlyTrait<HeapVector<WeakMember<TraceTypeEagerly1>>>::value, ShouldBeTrue);
- COMPILE_ASSERT(TraceEagerlyTrait<HeapHashSet<Member<TraceTypeEagerly1>>>::value, ShouldBeTrue);
- COMPILE_ASSERT(TraceEagerlyTrait<HeapHashSet<Member<TraceTypeEagerly1>>>::value, ShouldBeTrue);
+ static_assert(TraceEagerlyTrait<TraceTypeEagerly1>::value, "should be true");
+ static_assert(TraceEagerlyTrait<Member<TraceTypeEagerly1>>::value, "should be true");
+ static_assert(TraceEagerlyTrait<WeakMember<TraceTypeEagerly1>>::value, "should be true");
+ static_assert(TraceEagerlyTrait<RawPtr<TraceTypeEagerly1>>::value == MARKER_EAGER_TRACING, "should be true");
+ static_assert(TraceEagerlyTrait<HeapVector<Member<TraceTypeEagerly1>>>::value, "should be true");
+ static_assert(TraceEagerlyTrait<HeapVector<WeakMember<TraceTypeEagerly1>>>::value, "should be true");
+ static_assert(TraceEagerlyTrait<HeapHashSet<Member<TraceTypeEagerly1>>>::value, "should be true");
+ static_assert(TraceEagerlyTrait<HeapHashSet<Member<TraceTypeEagerly1>>>::value, "should be true");
using HashMapIntToObj = HeapHashMap<int, Member<TraceTypeEagerly1>>;
- COMPILE_ASSERT(TraceEagerlyTrait<HashMapIntToObj>::value, ShouldBeTrue);
+ static_assert(TraceEagerlyTrait<HashMapIntToObj>::value, "should be true");
using HashMapObjToInt = HeapHashMap<Member<TraceTypeEagerly1>, int>;
- COMPILE_ASSERT(TraceEagerlyTrait<HashMapObjToInt>::value, ShouldBeTrue);
+ static_assert(TraceEagerlyTrait<HashMapObjToInt>::value, "should be true");
- COMPILE_ASSERT(TraceEagerlyTrait<TraceTypeEagerly2>::value, ShouldBeTrue);
- COMPILE_ASSERT(TraceEagerlyTrait<Member<TraceTypeEagerly2>>::value, ShouldBeTrue);
+ static_assert(TraceEagerlyTrait<TraceTypeEagerly2>::value, "should be true");
+ static_assert(TraceEagerlyTrait<Member<TraceTypeEagerly2>>::value, "should be true");
- COMPILE_ASSERT(!TraceEagerlyTrait<TraceTypeNonEagerly1>::value, ShouldBeTrue);
- COMPILE_ASSERT(!TraceEagerlyTrait<TraceTypeNonEagerly2>::value, ShouldBeTrue);
- COMPILE_ASSERT(!TraceEagerlyTrait<TraceTypeNonEagerly3>::value, ShouldBeTrue);
- COMPILE_ASSERT(TraceEagerlyTrait<TraceTypeNonEagerly4>::value == MARKER_EAGER_TRACING, ShouldBeTrue);
+ static_assert(!TraceEagerlyTrait<TraceTypeNonEagerly1>::value, "should be true");
+ static_assert(!TraceEagerlyTrait<TraceTypeNonEagerly2>::value, "should be true");
+ static_assert(!TraceEagerlyTrait<TraceTypeNonEagerly3>::value, "should be true");
+ static_assert(TraceEagerlyTrait<TraceTypeNonEagerly4>::value == MARKER_EAGER_TRACING, "should be true");
}
class DeepEagerly final : public GarbageCollected<DeepEagerly> {
« no previous file with comments | « Source/platform/heap/Heap.cpp ('k') | Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698