| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 // Equal objects. | 196 // Equal objects. |
| 197 EXPECT(!Dart_IdentityEquals(five, five_again)); | 197 EXPECT(!Dart_IdentityEquals(five, five_again)); |
| 198 | 198 |
| 199 // Different objects. | 199 // Different objects. |
| 200 EXPECT(!Dart_IdentityEquals(five, seven)); | 200 EXPECT(!Dart_IdentityEquals(five, seven)); |
| 201 | 201 |
| 202 // Non-instance objects. | 202 // Non-instance objects. |
| 203 { | 203 { |
| 204 Isolate* isolate = Isolate::Current(); | 204 Isolate* isolate = Isolate::Current(); |
| 205 DARTSCOPE(isolate); | 205 DARTSCOPE(isolate); |
| 206 Dart_Handle class1 = Api::NewHandle(isolate, Object::null_class()); | 206 Dart_Handle class1 = Api::NewHandle(isolate, Object::void_class()); |
| 207 Dart_Handle class2 = Api::NewHandle(isolate, Object::class_class()); | 207 Dart_Handle class2 = Api::NewHandle(isolate, Object::class_class()); |
| 208 | 208 |
| 209 EXPECT(Dart_IdentityEquals(class1, class1)); | 209 EXPECT(Dart_IdentityEquals(class1, class1)); |
| 210 | 210 |
| 211 EXPECT(!Dart_IdentityEquals(class1, class2)); | 211 EXPECT(!Dart_IdentityEquals(class1, class2)); |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 | 214 |
| 215 | 215 |
| 216 TEST_CASE(ObjectEquals) { | 216 TEST_CASE(ObjectEquals) { |
| (...skipping 7035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7252 NewString("main"), | 7252 NewString("main"), |
| 7253 0, | 7253 0, |
| 7254 NULL); | 7254 NULL); |
| 7255 int64_t value = 0; | 7255 int64_t value = 0; |
| 7256 result = Dart_IntegerToInt64(result, &value); | 7256 result = Dart_IntegerToInt64(result, &value); |
| 7257 EXPECT_VALID(result); | 7257 EXPECT_VALID(result); |
| 7258 EXPECT_EQ(8, value); | 7258 EXPECT_EQ(8, value); |
| 7259 } | 7259 } |
| 7260 | 7260 |
| 7261 } // namespace dart | 7261 } // namespace dart |
| OLD | NEW |