OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 args->ui32 = kExpectedUInt32Value; | 89 args->ui32 = kExpectedUInt32Value; |
90 args->ui16 = kExpectedUInt16Value; | 90 args->ui16 = kExpectedUInt16Value; |
91 args->ui8 = kExpectedUInt8Value; | 91 args->ui8 = kExpectedUInt8Value; |
92 args->float_val = kExpectedFloatVal; | 92 args->float_val = kExpectedFloatVal; |
93 args->float_inf = kExpectedFloatInf; | 93 args->float_inf = kExpectedFloatInf; |
94 args->float_nan = kExpectedFloatNan; | 94 args->float_nan = kExpectedFloatNan; |
95 args->double_val = kExpectedDoubleVal; | 95 args->double_val = kExpectedDoubleVal; |
96 args->double_inf = kExpectedDoubleInf; | 96 args->double_inf = kExpectedDoubleInf; |
97 args->double_nan = kExpectedDoubleNan; | 97 args->double_nan = kExpectedDoubleNan; |
98 args->name = "coming"; | 98 args->name = "coming"; |
99 Array<String> string_array(3); | 99 auto string_array = Array<String>::New(3); |
100 string_array[0] = "one"; | 100 string_array[0] = "one"; |
101 string_array[1] = "two"; | 101 string_array[1] = "two"; |
102 string_array[2] = "three"; | 102 string_array[2] = "three"; |
103 args->string_array = string_array.Pass(); | 103 args->string_array = string_array.Pass(); |
104 return args.Pass(); | 104 return args.Pass(); |
105 } | 105 } |
106 | 106 |
107 void CheckSampleEchoArgs(const dart_to_cpp::EchoArgs& arg) { | 107 void CheckSampleEchoArgs(const dart_to_cpp::EchoArgs& arg) { |
108 EXPECT_EQ(kExpectedInt64Value, arg.si64); | 108 EXPECT_EQ(kExpectedInt64Value, arg.si64); |
109 EXPECT_EQ(kExpectedInt32Value, arg.si32); | 109 EXPECT_EQ(kExpectedInt32Value, arg.si32); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 TEST_F(DartToCppTest, Echo) { | 367 TEST_F(DartToCppTest, Echo) { |
368 EchoCppSideConnection cpp_side_connection; | 368 EchoCppSideConnection cpp_side_connection; |
369 bool unhandled_exception = | 369 bool unhandled_exception = |
370 RunTest("dart_to_cpp_tests.dart", &cpp_side_connection); | 370 RunTest("dart_to_cpp_tests.dart", &cpp_side_connection); |
371 EXPECT_TRUE(cpp_side_connection.DidSucceed()); | 371 EXPECT_TRUE(cpp_side_connection.DidSucceed()); |
372 EXPECT_FALSE(unhandled_exception); | 372 EXPECT_FALSE(unhandled_exception); |
373 } | 373 } |
374 | 374 |
375 } // namespace dart | 375 } // namespace dart |
376 } // namespace mojo | 376 } // namespace mojo |
OLD | NEW |