| 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_debugger_api.h" | 7 #include "include/dart_debugger_api.h" |
| 8 #include "include/dart_mirrors_api.h" | 8 #include "include/dart_mirrors_api.h" |
| 9 #include "include/dart_native_api.h" | 9 #include "include/dart_native_api.h" |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 Dart_Handle null = Dart_Null(); | 513 Dart_Handle null = Dart_Null(); |
| 514 EXPECT_VALID(null); | 514 EXPECT_VALID(null); |
| 515 EXPECT(Dart_IsNull(null)); | 515 EXPECT(Dart_IsNull(null)); |
| 516 | 516 |
| 517 Dart_Handle str = NewString("test"); | 517 Dart_Handle str = NewString("test"); |
| 518 EXPECT_VALID(str); | 518 EXPECT_VALID(str); |
| 519 EXPECT(!Dart_IsNull(str)); | 519 EXPECT(!Dart_IsNull(str)); |
| 520 } | 520 } |
| 521 | 521 |
| 522 | 522 |
| 523 TEST_CASE(EmptyString) { |
| 524 Dart_Handle empty = Dart_EmptyString(); |
| 525 EXPECT_VALID(empty); |
| 526 EXPECT(!Dart_IsNull(empty)); |
| 527 } |
| 528 |
| 529 |
| 523 TEST_CASE(IdentityEquals) { | 530 TEST_CASE(IdentityEquals) { |
| 524 Dart_Handle five = Dart_NewInteger(5); | 531 Dart_Handle five = Dart_NewInteger(5); |
| 525 Dart_Handle five_again = Dart_NewInteger(5); | 532 Dart_Handle five_again = Dart_NewInteger(5); |
| 526 Dart_Handle mint = Dart_NewInteger(0xFFFFFFFF); | 533 Dart_Handle mint = Dart_NewInteger(0xFFFFFFFF); |
| 527 Dart_Handle mint_again = Dart_NewInteger(0xFFFFFFFF); | 534 Dart_Handle mint_again = Dart_NewInteger(0xFFFFFFFF); |
| 528 Dart_Handle abc = NewString("abc"); | 535 Dart_Handle abc = NewString("abc"); |
| 529 Dart_Handle abc_again = NewString("abc"); | 536 Dart_Handle abc_again = NewString("abc"); |
| 530 Dart_Handle xyz = NewString("abc"); | 537 Dart_Handle xyz = NewString("abc"); |
| 531 Dart_Handle dart_core = NewString("dart:core"); | 538 Dart_Handle dart_core = NewString("dart:core"); |
| 532 Dart_Handle dart_mirrors = NewString("dart:mirrors"); | 539 Dart_Handle dart_mirrors = NewString("dart:mirrors"); |
| (...skipping 7875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8408 NewString("main"), | 8415 NewString("main"), |
| 8409 1, | 8416 1, |
| 8410 dart_args); | 8417 dart_args); |
| 8411 int64_t value = 0; | 8418 int64_t value = 0; |
| 8412 result = Dart_IntegerToInt64(result, &value); | 8419 result = Dart_IntegerToInt64(result, &value); |
| 8413 EXPECT_VALID(result); | 8420 EXPECT_VALID(result); |
| 8414 EXPECT_EQ(6, value); | 8421 EXPECT_EQ(6, value); |
| 8415 } | 8422 } |
| 8416 | 8423 |
| 8417 } // namespace dart | 8424 } // namespace dart |
| OLD | NEW |