OLD | NEW |
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): There is some duplicate code here borrowed from | 5 // TODO(vardhan): There is some duplicate code here borrowed from |
6 // mojo/public/cpp/bindings/tests/validation_unittest.cc; extract it into a | 6 // mojo/public/cpp/bindings/tests/validation_unittest.cc; extract it into a |
7 // library, and share? | 7 // library, and share? |
8 | 8 |
9 #include <mojo/bindings/internal/util.h> | 9 #include <mojo/bindings/internal/util.h> |
10 #include <mojo/bindings/message.h> | 10 #include <mojo/bindings/message.h> |
11 #include <mojo/bindings/struct.h> | 11 #include <mojo/bindings/struct.h> |
12 #include <stdio.h> | 12 #include <stdio.h> |
13 | 13 |
14 #include <functional> | 14 #include <functional> |
15 #include <string> | 15 #include <string> |
16 | 16 |
| 17 #include "gtest/gtest.h" |
17 #include "mojo/public/cpp/bindings/tests/validation_util.h" | 18 #include "mojo/public/cpp/bindings/tests/validation_util.h" |
18 #include "mojo/public/cpp/system/macros.h" | 19 #include "mojo/public/cpp/system/macros.h" |
19 #include "mojo/public/cpp/test_support/test_support.h" | 20 #include "mojo/public/cpp/test_support/test_support.h" |
20 #include "mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom
-c.h" | 21 #include "mojo/public/interfaces/bindings/tests/validation_test_interfaces.mojom
-c.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | |
22 | 22 |
23 using mojo::test::EnumerateSourceRootRelativeDirectory; | 23 using mojo::test::EnumerateSourceRootRelativeDirectory; |
24 | 24 |
25 namespace mojo { | 25 namespace mojo { |
26 namespace test { | 26 namespace test { |
27 namespace { | 27 namespace { |
28 | 28 |
29 const char* MojomValidationResultToString(MojomValidationResult error) { | 29 const char* MojomValidationResultToString(MojomValidationResult error) { |
30 switch (error) { | 30 switch (error) { |
31 case MOJOM_VALIDATION_ERROR_NONE: | 31 case MOJOM_VALIDATION_ERROR_NONE: |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 TEST(ValidationTest, ResponseBoundsCheck) { | 261 TEST(ValidationTest, ResponseBoundsCheck) { |
262 RunValidationTests("resp_boundscheck_", | 262 RunValidationTests("resp_boundscheck_", |
263 DispatchBoundsCheckTestInterface_Response_Validate); | 263 DispatchBoundsCheckTestInterface_Response_Validate); |
264 } | 264 } |
265 | 265 |
266 // TODO(vardhan): Tests for "integration_" files. | 266 // TODO(vardhan): Tests for "integration_" files. |
267 | 267 |
268 } // namespace | 268 } // namespace |
269 } // namespace test | 269 } // namespace test |
270 } // namespace mojo | 270 } // namespace mojo |
OLD | NEW |