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

Unified Diff: third_party/WebKit/Source/wtf/TypeTraits.cpp

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 months 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 | « third_party/WebKit/Source/wtf/TypeTraits.h ('k') | third_party/WebKit/Source/wtf/TypedArrayBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/TypeTraits.cpp
diff --git a/third_party/WebKit/Source/wtf/TypeTraits.cpp b/third_party/WebKit/Source/wtf/TypeTraits.cpp
index 9b8c10352f5621e19698769b6940772598cf8b8a..0fd603d37de62cceacacf2c5b2fc837626790c9b 100644
--- a/third_party/WebKit/Source/wtf/TypeTraits.cpp
+++ b/third_party/WebKit/Source/wtf/TypeTraits.cpp
@@ -1,4 +1,4 @@
- /*
+/*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2009, 2010 Google Inc. All rights reserved.
*
@@ -26,77 +26,99 @@
namespace WTF {
struct VirtualClass {
- virtual void A() { }
+ virtual void A() {}
};
-static_assert(!IsTriviallyMoveAssignable<VirtualClass>::value, "VirtualClass should not be trivially move assignable");
+static_assert(!IsTriviallyMoveAssignable<VirtualClass>::value,
+ "VirtualClass should not be trivially move assignable");
struct DestructorClass {
- ~DestructorClass() { }
+ ~DestructorClass() {}
};
-static_assert(IsTriviallyMoveAssignable<DestructorClass>::value, "DestructorClass should be trivially move assignable");
-static_assert(IsTriviallyCopyAssignable<DestructorClass>::value, "DestructorClass should be trivially copy assignable");
-static_assert(IsTriviallyDefaultConstructible<DestructorClass>::value, "DestructorClass should have a trivial default constructor");
+static_assert(IsTriviallyMoveAssignable<DestructorClass>::value,
+ "DestructorClass should be trivially move assignable");
+static_assert(IsTriviallyCopyAssignable<DestructorClass>::value,
+ "DestructorClass should be trivially copy assignable");
+static_assert(IsTriviallyDefaultConstructible<DestructorClass>::value,
+ "DestructorClass should have a trivial default constructor");
struct MixedPrivate {
- int M2() { return m2; }
- int m1;
-private:
- int m2;
+ int M2() { return m2; }
+ int m1;
+
+ private:
+ int m2;
};
-static_assert(IsTriviallyMoveAssignable<MixedPrivate>::value, "MixedPrivate should be trivially move assignable");
-static_assert(IsTriviallyCopyAssignable<MixedPrivate>::value, "MixedPrivate should be trivially copy assignable");
-static_assert(IsTriviallyDefaultConstructible<MixedPrivate>::value, "MixedPrivate should have a trivial default constructor");
+static_assert(IsTriviallyMoveAssignable<MixedPrivate>::value,
+ "MixedPrivate should be trivially move assignable");
+static_assert(IsTriviallyCopyAssignable<MixedPrivate>::value,
+ "MixedPrivate should be trivially copy assignable");
+static_assert(IsTriviallyDefaultConstructible<MixedPrivate>::value,
+ "MixedPrivate should have a trivial default constructor");
struct JustPrivate {
- int M2() { return m2; }
-private:
- int m2;
+ int M2() { return m2; }
+
+ private:
+ int m2;
};
-static_assert(IsTriviallyMoveAssignable<JustPrivate>::value, "JustPrivate should be trivially move assignable");
-static_assert(IsTriviallyCopyAssignable<JustPrivate>::value, "JustPrivate should be trivially copy assignable");
-static_assert(IsTriviallyDefaultConstructible<JustPrivate>::value, "JustPrivate should have a trivial default constructor");
+static_assert(IsTriviallyMoveAssignable<JustPrivate>::value,
+ "JustPrivate should be trivially move assignable");
+static_assert(IsTriviallyCopyAssignable<JustPrivate>::value,
+ "JustPrivate should be trivially copy assignable");
+static_assert(IsTriviallyDefaultConstructible<JustPrivate>::value,
+ "JustPrivate should have a trivial default constructor");
struct JustPublic {
- int m2;
+ int m2;
};
-static_assert(IsTriviallyMoveAssignable<JustPublic>::value, "JustPublic should be trivially move assignable");
-static_assert(IsTriviallyCopyAssignable<JustPublic>::value, "JustPublic should be trivially copy assignable");
-static_assert(IsTriviallyDefaultConstructible<JustPublic>::value, "JustPublic should have a trivial default constructor");
+static_assert(IsTriviallyMoveAssignable<JustPublic>::value,
+ "JustPublic should be trivially move assignable");
+static_assert(IsTriviallyCopyAssignable<JustPublic>::value,
+ "JustPublic should be trivially copy assignable");
+static_assert(IsTriviallyDefaultConstructible<JustPublic>::value,
+ "JustPublic should have a trivial default constructor");
struct NestedInherited : public JustPublic, JustPrivate {
- float m3;
+ float m3;
};
-static_assert(IsTriviallyMoveAssignable<NestedInherited>::value, "NestedInherited should be trivially move assignable");
-static_assert(IsTriviallyCopyAssignable<NestedInherited>::value, "NestedInherited should be trivially copy assignable");
-static_assert(IsTriviallyDefaultConstructible<NestedInherited>::value, "NestedInherited should have a trivial default constructor");
+static_assert(IsTriviallyMoveAssignable<NestedInherited>::value,
+ "NestedInherited should be trivially move assignable");
+static_assert(IsTriviallyCopyAssignable<NestedInherited>::value,
+ "NestedInherited should be trivially copy assignable");
+static_assert(IsTriviallyDefaultConstructible<NestedInherited>::value,
+ "NestedInherited should have a trivial default constructor");
struct NestedOwned {
- JustPublic m1;
- JustPrivate m2;
- float m3;
+ JustPublic m1;
+ JustPrivate m2;
+ float m3;
};
-static_assert(IsTriviallyMoveAssignable<NestedOwned>::value, "NestedOwned should be trivially move assignable");
-static_assert(IsTriviallyCopyAssignable<NestedOwned>::value, "NestedOwned should be trivially copy assignable");
-static_assert(IsTriviallyDefaultConstructible<NestedOwned>::value, "NestedOwned should have a trivial default constructor");
+static_assert(IsTriviallyMoveAssignable<NestedOwned>::value,
+ "NestedOwned should be trivially move assignable");
+static_assert(IsTriviallyCopyAssignable<NestedOwned>::value,
+ "NestedOwned should be trivially copy assignable");
+static_assert(IsTriviallyDefaultConstructible<NestedOwned>::value,
+ "NestedOwned should have a trivial default constructor");
class NonCopyableClass {
- WTF_MAKE_NONCOPYABLE(NonCopyableClass);
+ WTF_MAKE_NONCOPYABLE(NonCopyableClass);
};
-#if 0 // Compilers don't get this "right" yet if using = delete.
+#if 0 // Compilers don't get this "right" yet if using = delete.
static_assert(!IsTriviallyMoveAssignable<NonCopyableClass>::value, "NonCopyableClass should not be trivially move assignable");
static_assert(!IsTriviallyCopyAssignable<NonCopyableClass>::value, "NonCopyableClass should not be trivially copy assignable");
static_assert(IsTriviallyDefaultConstructible<NonCopyableClass>::value, "NonCopyableClass should have a trivial default constructor");
-#endif // 0
+#endif // 0
template <typename T>
-class TestBaseClass {
-};
+class TestBaseClass {};
-class TestDerivedClass : public TestBaseClass<int> {
-};
+class TestDerivedClass : public TestBaseClass<int> {};
-static_assert((IsSubclass<TestDerivedClass, TestBaseClass<int>>::value), "Derived class should be a subclass of its base");
-static_assert((!IsSubclass<TestBaseClass<int>, TestDerivedClass>::value), "Base class should not be a sublass of a derived class");
-static_assert((IsSubclassOfTemplate<TestDerivedClass, TestBaseClass>::value), "Derived class should be a subclass of template from its base");
+static_assert((IsSubclass<TestDerivedClass, TestBaseClass<int>>::value),
+ "Derived class should be a subclass of its base");
+static_assert((!IsSubclass<TestBaseClass<int>, TestDerivedClass>::value),
+ "Base class should not be a sublass of a derived class");
+static_assert((IsSubclassOfTemplate<TestDerivedClass, TestBaseClass>::value),
+ "Derived class should be a subclass of template from its base");
typedef int IntArray[];
typedef int IntArraySized[4];
-} // namespace WTF
+} // namespace WTF
« no previous file with comments | « third_party/WebKit/Source/wtf/TypeTraits.h ('k') | third_party/WebKit/Source/wtf/TypedArrayBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698