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

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

Issue 2234063002: Move the C bindings tests to the new location. (Closed) Base URL: https://github.com/domokit/mojo.git@work791_mojo_bindings
Patch Set: 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
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/bindings/union.h> 7 #include <mojo/bindings/union.h>
8 8
9 #include <mojo/bindings/array.h> 9 #include <mojo/bindings/array.h>
10 10
11 #include "mojo/public/c/bindings/tests/testing_util.h" 11 #include "mojo/public/c/tests/bindings/testing_util.h"
12 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom-c.h" 12 #include "mojo/public/interfaces/bindings/tests/test_structs.mojom-c.h"
13 #include "mojo/public/interfaces/bindings/tests/test_unions.mojom-c.h" 13 #include "mojo/public/interfaces/bindings/tests/test_unions.mojom-c.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace { 16 namespace {
17 17
18 struct mojo_test_StructOfUnionOfReferences* MakeStructOfUnionReference( 18 struct mojo_test_StructOfUnionOfReferences* MakeStructOfUnionReference(
19 struct MojomBuffer* buf) { 19 struct MojomBuffer* buf) {
20 auto* struct_with_union = 20 auto* struct_with_union =
21 static_cast<struct mojo_test_StructOfUnionOfReferences*>( 21 static_cast<struct mojo_test_StructOfUnionOfReferences*>(
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 struct MojomBuffer buf2 = {buffer_bytes2, sizeof(buffer_bytes2), 0}; 194 struct MojomBuffer buf2 = {buffer_bytes2, sizeof(buffer_bytes2), 0};
195 CopyAndCompare( 195 CopyAndCompare(
196 &buf2, struct_with_union, buf.num_bytes_used, 196 &buf2, struct_with_union, buf.num_bytes_used,
197 mojo_test_StructOfUnionOfReferences_DeepCopy, 197 mojo_test_StructOfUnionOfReferences_DeepCopy,
198 mojo_test_StructOfUnionOfReferences_EncodePointersAndHandles, 198 mojo_test_StructOfUnionOfReferences_EncodePointersAndHandles,
199 mojo_test_StructOfUnionOfReferences_DecodePointersAndHandles); 199 mojo_test_StructOfUnionOfReferences_DecodePointersAndHandles);
200 } 200 }
201 } 201 }
202 202
203 } // namespace 203 } // namespace
OLDNEW
« no previous file with comments | « mojo/public/c/tests/bindings/testing_util.h ('k') | mojo/public/c/tests/bindings/validation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698