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 "include/dart_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
6 #include "include/dart_mirrors_api.h" | 6 #include "include/dart_mirrors_api.h" |
7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
9 #include "vm/lockers.h" | 9 #include "vm/lockers.h" |
10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
(...skipping 2085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2096 Dart_Handle name, sig; | 2096 Dart_Handle name, sig; |
2097 Dart_CodeLocation loc; | 2097 Dart_CodeLocation loc; |
2098 loc.script_url = Dart_Null(); | 2098 loc.script_url = Dart_Null(); |
2099 loc.library_id = -1; | 2099 loc.library_id = -1; |
2100 loc.token_pos = -1; | 2100 loc.token_pos = -1; |
2101 Dart_Handle res = Dart_GetClosureInfo(clo, &name, &sig, &loc); | 2101 Dart_Handle res = Dart_GetClosureInfo(clo, &name, &sig, &loc); |
2102 EXPECT_VALID(res); | 2102 EXPECT_VALID(res); |
2103 EXPECT_TRUE(res); | 2103 EXPECT_TRUE(res); |
2104 EXPECT_VALID(name); | 2104 EXPECT_VALID(name); |
2105 EXPECT(Dart_IsString(name)); | 2105 EXPECT(Dart_IsString(name)); |
2106 EXPECT_STREQ("foo", ToCString(name)); | 2106 EXPECT_STREQ("foo.<implicit closure>", ToCString(name)); |
2107 EXPECT(Dart_IsString(sig)); | 2107 EXPECT(Dart_IsString(sig)); |
2108 EXPECT_STREQ("() => void", ToCString(sig)); | 2108 EXPECT_STREQ("() => void", ToCString(sig)); |
2109 EXPECT(Dart_IsString(loc.script_url)); | 2109 EXPECT(Dart_IsString(loc.script_url)); |
2110 EXPECT_STREQ("test-lib", ToCString(loc.script_url)); | 2110 EXPECT_STREQ("test-lib", ToCString(loc.script_url)); |
2111 EXPECT_EQ(0, loc.token_pos); | 2111 EXPECT_EQ(0, loc.token_pos); |
2112 EXPECT(loc.library_id > 0); | 2112 EXPECT(loc.library_id > 0); |
2113 } | 2113 } |
2114 | 2114 |
2115 | 2115 |
2116 TEST_CASE(Debug_GetSupertype) { | 2116 TEST_CASE(Debug_GetSupertype) { |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," | 2309 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," |
2310 " null, 4, 13, 3, 14, 10," | 2310 " null, 4, 13, 3, 14, 10," |
2311 " null, 5, 17, 5, 18, 9, 19, 12," | 2311 " null, 5, 17, 5, 18, 9, 19, 12," |
2312 " null, 6, 21, 1," | 2312 " null, 6, 21, 1," |
2313 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," | 2313 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," |
2314 " null, 9, 29, 1]", | 2314 " null, 9, 29, 1]", |
2315 tokens_cstr); | 2315 tokens_cstr); |
2316 } | 2316 } |
2317 | 2317 |
2318 } // namespace dart | 2318 } // namespace dart |
OLD | NEW |