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

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

Issue 1770493002: Remove MOJO_STATIC_CONST_MEMBER_DEFINITION. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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
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 ab4ca80c121276699dc516349bd525a1094edc34..8ee849038a0f5815dfb7346c5e668f06a65e8334 100644
--- a/mojo/public/cpp/system/tests/macros_unittest.cc
+++ b/mojo/public/cpp/system/tests/macros_unittest.cc
@@ -19,19 +19,6 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace mojo {
-
-// The test for |MOJO_STATIC_CONST_MEMBER_DEFINITION| is really a compile/link
-// test. To test it fully would really require a header file and multiple .cc
-// files, but we'll just cursorily verify it.
-//
-// This is defined outside of an anonymous namespace because
-// MOJO_STATIC_CONST_MEMBER_DEFINITION may not be used on internal symbols.
-struct StructWithStaticConstMember {
- static const int kStaticConstMember = 123;
-};
-MOJO_STATIC_CONST_MEMBER_DEFINITION
-const int StructWithStaticConstMember::kStaticConstMember;
-
namespace {
// Note: MSVS is very strict (and arguably buggy) about warnings for classes
@@ -140,12 +127,6 @@ TEST(MacrosCppTest, MoveOnlyType) {
EXPECT_EQ(123, z.value());
}
-// Use it, to make sure things get linked in and to avoid any warnings about
-// unused things.
-TEST(MacrosCppTest, StaticConstMemberDefinition) {
- EXPECT_EQ(123, StructWithStaticConstMember::kStaticConstMember);
-}
-
// The test for |ignore_result()| is also just a compilation test. (Note that
// |MOJO_WARN_UNUSED_RESULT| can only be used in the prototype.
int ReturnsIntYouMustUse() MOJO_WARN_UNUSED_RESULT;
« no previous file with comments | « mojo/public/cpp/system/macros.h ('k') | mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698