Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Side by Side Diff: runtime/vm/dart_api_impl_test.cc

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated latest tests. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_api.h" 5 #include "include/dart_api.h"
6 #include "platform/assert.h" 6 #include "platform/assert.h"
7 #include "platform/json.h" 7 #include "platform/json.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/class_finalizer.h" 9 #include "vm/class_finalizer.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
(...skipping 6521 matching lines...) Expand 10 before | Expand all | Expand 10 after
6532 " int bar30() { var func = foo3; return func(); }\n" 6532 " int bar30() { var func = foo3; return func(); }\n"
6533 " int bar31(int i) { var func = foo3; return func(i); }\n" 6533 " int bar31(int i) { var func = foo3; return func(i); }\n"
6534 " int bar32(int i, int j) { var func = foo3; return func(i, j); }\n" 6534 " int bar32(int i, int j) { var func = foo3; return func(i, j); }\n"
6535 " int bar41(int i) {\n" 6535 " int bar41(int i) {\n"
6536 " var func = foo4; return func(i); }\n" 6536 " var func = foo4; return func(i); }\n"
6537 " int bar42(int i, int j) {\n" 6537 " int bar42(int i, int j) {\n"
6538 " var func = foo4; return func(i, j); }\n" 6538 " var func = foo4; return func(i, j); }\n"
6539 " int bar43(int i, int j, int k) {\n" 6539 " int bar43(int i, int j, int k) {\n"
6540 " var func = foo4; return func(i, j, k); }\n" 6540 " var func = foo4; return func(i, j, k); }\n"
6541 "}\n" 6541 "}\n"
6542 "class Expect {\n"
6543 " static void equals(x, y) {\n"
6544 " if (x != y) throw new Error('not equal');\n"
6545 " }\n"
6546 "}\n"
6542 "int testMain() {\n" 6547 "int testMain() {\n"
6543 " Test obj = new Test();\n" 6548 " Test obj = new Test();\n"
6544 " Expect.equals(1, obj.foo1());\n" 6549 " Expect.equals(1, obj.foo1());\n"
6545 " Expect.equals(1, obj.bar1());\n" 6550 " Expect.equals(1, obj.bar1());\n"
6546 "\n" 6551 "\n"
6547 " Expect.equals(10, obj.foo2(10));\n" 6552 " Expect.equals(10, obj.foo2(10));\n"
6548 " Expect.equals(10, obj.bar2(10));\n" 6553 " Expect.equals(10, obj.bar2(10));\n"
6549 "\n" 6554 "\n"
6550 " Expect.equals(10001, obj.foo3());\n" 6555 " Expect.equals(10001, obj.foo3());\n"
6551 " Expect.equals(10001, obj.bar30());\n" 6556 " Expect.equals(10001, obj.bar30());\n"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
6670 " int bar30() { var func = foo3; return func(); }\n" 6675 " int bar30() { var func = foo3; return func(); }\n"
6671 " int bar31(int i) { var func = foo3; return func(i); }\n" 6676 " int bar31(int i) { var func = foo3; return func(i); }\n"
6672 " int bar32(int i, int j) { var func = foo3; return func(i, j); }\n" 6677 " int bar32(int i, int j) { var func = foo3; return func(i, j); }\n"
6673 " int bar41(int i) {\n" 6678 " int bar41(int i) {\n"
6674 " var func = foo4; return func(i); }\n" 6679 " var func = foo4; return func(i); }\n"
6675 " int bar42(int i, int j) {\n" 6680 " int bar42(int i, int j) {\n"
6676 " var func = foo4; return func(i, j); }\n" 6681 " var func = foo4; return func(i, j); }\n"
6677 " int bar43(int i, int j, int k) {\n" 6682 " int bar43(int i, int j, int k) {\n"
6678 " var func = foo4; return func(i, j, k); }\n" 6683 " var func = foo4; return func(i, j, k); }\n"
6679 "}\n" 6684 "}\n"
6685 "class Expect {\n"
6686 " static void equals(x, y) {\n"
6687 " if (x != y) throw new Error('not equal');\n"
6688 " }\n"
6689 "}\n"
6680 "int testMain() {\n" 6690 "int testMain() {\n"
6681 " Test obj = new Test();\n" 6691 " Test obj = new Test();\n"
6682 " Expect.equals(0, Test.foo1());\n" 6692 " Expect.equals(0, Test.foo1());\n"
6683 " Expect.equals(0, obj.bar1());\n" 6693 " Expect.equals(0, obj.bar1());\n"
6684 "\n" 6694 "\n"
6685 " Expect.equals(10, Test.foo2(10));\n" 6695 " Expect.equals(10, Test.foo2(10));\n"
6686 " Expect.equals(10, obj.bar2(10));\n" 6696 " Expect.equals(10, obj.bar2(10));\n"
6687 "\n" 6697 "\n"
6688 " Expect.equals(10001, Test.foo3());\n" 6698 " Expect.equals(10001, Test.foo3());\n"
6689 " Expect.equals(10001, obj.bar30());\n" 6699 " Expect.equals(10001, obj.bar30());\n"
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
7430 NULL); 7440 NULL);
7431 int64_t value = 0; 7441 int64_t value = 0;
7432 result = Dart_IntegerToInt64(result, &value); 7442 result = Dart_IntegerToInt64(result, &value);
7433 EXPECT_VALID(result); 7443 EXPECT_VALID(result);
7434 EXPECT_EQ(260, value); 7444 EXPECT_EQ(260, value);
7435 } 7445 }
7436 7446
7437 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 7447 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
7438 7448
7439 } // namespace dart 7449 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698