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

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

Issue 218023002: Mojo: Move mojo/public/{c,cpp}/tests/FOO to mojo/public/{c,cpp}/FOO/tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/c/tests/system/core_unittest_pure_c.c ('k') | mojo/public/cpp/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/c/tests/system/macros_unittest.cc
diff --git a/mojo/public/c/tests/system/macros_unittest.cc b/mojo/public/c/tests/system/macros_unittest.cc
deleted file mode 100644
index 5225b67cdbf7371158f32dca80ab4678630fe3b0..0000000000000000000000000000000000000000
--- a/mojo/public/c/tests/system/macros_unittest.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file tests the C Mojo system macros and consists of "positive" tests,
-// i.e., those verifying that things work (without compile errors, or even
-// warnings if warnings are treated as errors).
-// TODO(vtl): Fix no-compile tests (which are all disabled; crbug.com/105388)
-// and write some "negative" tests.
-
-#include "mojo/public/c/system/macros.h"
-
-#include <assert.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace mojo {
-namespace {
-
-TEST(MacrosTest, AllowUnused) {
- // Test that no warning/error is issued even though |x| is unused.
- int x MOJO_ALLOW_UNUSED = 123;
-}
-
-int MustUseReturnedResult() MOJO_WARN_UNUSED_RESULT;
-int MustUseReturnedResult() {
- return 456;
-}
-
-TEST(MacrosTest, WarnUnusedResult) {
- if (!MustUseReturnedResult())
- abort();
-}
-
-// First test |MOJO_COMPILE_ASSERT()| in a global scope.
-MOJO_COMPILE_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t),
- bad_compile_assert_failure_in_global_scope);
-
-TEST(MacrosTest, CompileAssert) {
- // Then in a local scope.
- MOJO_COMPILE_ASSERT(sizeof(int32_t) == 2 * sizeof(int16_t),
- bad_compile_assert_failure);
-}
-
-} // namespace
-} // namespace mojo
« no previous file with comments | « mojo/public/c/tests/system/core_unittest_pure_c.c ('k') | mojo/public/cpp/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698