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

Unified Diff: mojo/public/cpp/system/tests/macros_unittest.cc

Issue 1755003002: Remove MOJO_DISALLOW_COPY_AND_ASSIGN and MOJO_ALLOW_UNUSED_LOCAL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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 | « mojo/public/cpp/system/message_pipe.h ('k') | mojo/public/cpp/utility/lib/thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/tests/macros_unittest.cc
diff --git a/mojo/public/cpp/system/tests/macros_unittest.cc b/mojo/public/cpp/system/tests/macros_unittest.cc
index e9daf52b0c5192c7865dedb62136cfca528bdd86..ab4c0b69f1b5f1f7afbed9de487544ea28369338 100644
--- a/mojo/public/cpp/system/tests/macros_unittest.cc
+++ b/mojo/public/cpp/system/tests/macros_unittest.cc
@@ -17,6 +17,7 @@
#include <stdlib.h>
#include <utility>
+#include "base/compiler_specific.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
@@ -55,25 +56,6 @@ TEST(MacrosCppTest, Override) {
x.AlsoToBeOverridden();
}
-// Note: MSVS is very strict (and arguably buggy) about warnings for classes
-// defined in a local scope, so define these globally.
-class TestDisallowCopyAndAssignClass {
- public:
- TestDisallowCopyAndAssignClass() {}
- explicit TestDisallowCopyAndAssignClass(int) {}
- void NoOp() {}
-
- private:
- MOJO_DISALLOW_COPY_AND_ASSIGN(TestDisallowCopyAndAssignClass);
-};
-
-TEST(MacrosCppTest, DisallowCopyAndAssign) {
- TestDisallowCopyAndAssignClass x;
- x.NoOp();
- TestDisallowCopyAndAssignClass y(789);
- y.NoOp();
-}
-
// Test that |MOJO_ARRAYSIZE()| works in a |static_assert()|.
const int kGlobalArray[5] = {1, 2, 3, 4, 5};
static_assert(MOJO_ARRAYSIZE(kGlobalArray) == 5u,
@@ -83,7 +65,7 @@ TEST(MacrosCppTest, ArraySize) {
double local_array[4] = {6.7, 7.8, 8.9, 9.0};
// MSVS considers this local variable unused since MOJO_ARRAYSIZE only takes
// the size of the type of the local and not the values itself.
- MOJO_ALLOW_UNUSED_LOCAL(local_array);
+ ALLOW_UNUSED_LOCAL(local_array);
EXPECT_EQ(4u, MOJO_ARRAYSIZE(local_array));
}
« no previous file with comments | « mojo/public/cpp/system/message_pipe.h ('k') | mojo/public/cpp/utility/lib/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698