| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "bin/builtin.h" | 5 #include "bin/builtin.h" |
| 6 #include "include/dart_api.h" | 6 #include "include/dart_api.h" |
| 7 #include "include/dart_mirrors_api.h" | 7 #include "include/dart_mirrors_api.h" |
| 8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/json.h" | 10 #include "platform/json.h" |
| (...skipping 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2808 EXPECT_VALID(Dart_ClassGetInterfaceCount(intf0, &len)); | 2808 EXPECT_VALID(Dart_ClassGetInterfaceCount(intf0, &len)); |
| 2809 EXPECT_EQ(0, len); | 2809 EXPECT_EQ(0, len); |
| 2810 | 2810 |
| 2811 len = -1; | 2811 len = -1; |
| 2812 EXPECT_VALID(Dart_ClassGetInterfaceCount(intf1, &len)); | 2812 EXPECT_VALID(Dart_ClassGetInterfaceCount(intf1, &len)); |
| 2813 EXPECT_EQ(1, len); | 2813 EXPECT_EQ(1, len); |
| 2814 CHECK_CLASS(Dart_ClassGetInterfaceAt(intf1, 0), "MyInterface0"); | 2814 CHECK_CLASS(Dart_ClassGetInterfaceAt(intf1, 0), "MyInterface0"); |
| 2815 | 2815 |
| 2816 // Error cases. | 2816 // Error cases. |
| 2817 EXPECT_ERROR(Dart_ClassGetInterfaceCount(Dart_True(), &len), | 2817 EXPECT_ERROR(Dart_ClassGetInterfaceCount(Dart_True(), &len), |
| 2818 "Dart_ClassGetInterfaceCount expects argument 'clazz' to be of " | 2818 "Dart_ClassGetInterfaceCount expects argument 'object' to be of " |
| 2819 "type Class."); | 2819 "type Class/Type."); |
| 2820 EXPECT_ERROR(Dart_ClassGetInterfaceCount(Dart_NewApiError("MyError"), &len), | 2820 EXPECT_ERROR(Dart_ClassGetInterfaceCount(Dart_NewApiError("MyError"), &len), |
| 2821 "MyError"); | 2821 "MyError"); |
| 2822 } | 2822 } |
| 2823 | 2823 |
| 2824 | 2824 |
| 2825 TEST_CASE(TypeGetNonParamtericTypes) { | 2825 TEST_CASE(TypeGetNonParamtericTypes) { |
| 2826 const char* kScriptChars = | 2826 const char* kScriptChars = |
| 2827 "class MyClass0 {\n" | 2827 "class MyClass0 {\n" |
| 2828 "}\n" | 2828 "}\n" |
| 2829 "\n" | 2829 "\n" |
| (...skipping 5312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8142 NewString("main"), | 8142 NewString("main"), |
| 8143 0, | 8143 0, |
| 8144 NULL); | 8144 NULL); |
| 8145 int64_t value = 0; | 8145 int64_t value = 0; |
| 8146 result = Dart_IntegerToInt64(result, &value); | 8146 result = Dart_IntegerToInt64(result, &value); |
| 8147 EXPECT_VALID(result); | 8147 EXPECT_VALID(result); |
| 8148 EXPECT_EQ(8, value); | 8148 EXPECT_EQ(8, value); |
| 8149 } | 8149 } |
| 8150 | 8150 |
| 8151 } // namespace dart | 8151 } // namespace dart |
| OLD | NEW |