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

Side by Side Diff: mojo/public/c/bindings/tests/array_unittest.cc

Issue 2232833003: Change the canonical way to include the C bindings headers to <mojo/bindings/*.h>. (Closed) Base URL: https://github.com/domokit/mojo.git@work791_mojo_tests
Patch Set: rebased Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « mojo/public/c/bindings/tests/BUILD.gn ('k') | mojo/public/c/bindings/tests/buffer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // TODO(vardhan): Needs a lot more testing. 5 // TODO(vardhan): Needs a lot more testing.
6 6
7 #include "mojo/public/c/bindings/array.h" 7 #include <mojo/bindings/array.h>
8 8
9 #include <mojo/bindings/struct.h>
9 #include <stddef.h> 10 #include <stddef.h>
10 11
11 #include "mojo/public/c/bindings/struct.h"
12 #include "mojo/public/c/bindings/tests/testing_util.h" 12 #include "mojo/public/c/bindings/tests/testing_util.h"
13 #include "mojo/public/cpp/system/macros.h" 13 #include "mojo/public/cpp/system/macros.h"
14 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom-c.h" 14 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom-c.h"
15 #include "mojo/public/interfaces/bindings/tests/test_unions.mojom-c.h" 15 #include "mojo/public/interfaces/bindings/tests/test_unions.mojom-c.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 namespace { 18 namespace {
19 19
20 // Tests MojomArray_New(). 20 // Tests MojomArray_New().
21 TEST(ArrayTest, New) { 21 TEST(ArrayTest, New) {
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 EXPECT_EQ(static_cast<MojoHandle>(20u), 285 EXPECT_EQ(static_cast<MojoHandle>(20u),
286 *MOJOM_ARRAY_INDEX(copied_struct->array_h.ptr, MojoHandle, 0)); 286 *MOJOM_ARRAY_INDEX(copied_struct->array_h.ptr, MojoHandle, 0));
287 EXPECT_EQ(MOJO_HANDLE_INVALID, 287 EXPECT_EQ(MOJO_HANDLE_INVALID,
288 *MOJOM_ARRAY_INDEX(copied_struct->array_h.ptr, MojoHandle, 1)); 288 *MOJOM_ARRAY_INDEX(copied_struct->array_h.ptr, MojoHandle, 1));
289 EXPECT_EQ(static_cast<MojoHandle>(30u), 289 EXPECT_EQ(static_cast<MojoHandle>(30u),
290 *MOJOM_ARRAY_INDEX(copied_struct->array_h.ptr, MojoHandle, 2)); 290 *MOJOM_ARRAY_INDEX(copied_struct->array_h.ptr, MojoHandle, 2));
291 } 291 }
292 } 292 }
293 293
294 } // namespace 294 } // namespace
OLDNEW
« no previous file with comments | « mojo/public/c/bindings/tests/BUILD.gn ('k') | mojo/public/c/bindings/tests/buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698