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

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: Created 7 years, 10 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 6430 matching lines...) Expand 10 before | Expand all | Expand 10 after
6441 " int bar30() { var func = foo3; return func(); }\n" 6441 " int bar30() { var func = foo3; return func(); }\n"
6442 " int bar31(int i) { var func = foo3; return func(i); }\n" 6442 " int bar31(int i) { var func = foo3; return func(i); }\n"
6443 " int bar32(int i, int j) { var func = foo3; return func(i, j); }\n" 6443 " int bar32(int i, int j) { var func = foo3; return func(i, j); }\n"
6444 " int bar41(int i) {\n" 6444 " int bar41(int i) {\n"
6445 " var func = foo4; return func(i); }\n" 6445 " var func = foo4; return func(i); }\n"
6446 " int bar42(int i, int j) {\n" 6446 " int bar42(int i, int j) {\n"
6447 " var func = foo4; return func(i, j); }\n" 6447 " var func = foo4; return func(i, j); }\n"
6448 " int bar43(int i, int j, int k) {\n" 6448 " int bar43(int i, int j, int k) {\n"
6449 " var func = foo4; return func(i, j, k); }\n" 6449 " var func = foo4; return func(i, j, k); }\n"
6450 "}\n" 6450 "}\n"
6451 "class Expect {\n"
6452 " static void equals(x, y) {\n"
6453 " if (x != y) throw new Error('not equal');\n"
6454 " }\n"
6455 "}\n"
6451 "int testMain() {\n" 6456 "int testMain() {\n"
6452 " Test obj = new Test();\n" 6457 " Test obj = new Test();\n"
6453 " Expect.equals(1, obj.foo1());\n" 6458 " Expect.equals(1, obj.foo1());\n"
6454 " Expect.equals(1, obj.bar1());\n" 6459 " Expect.equals(1, obj.bar1());\n"
6455 "\n" 6460 "\n"
6456 " Expect.equals(10, obj.foo2(10));\n" 6461 " Expect.equals(10, obj.foo2(10));\n"
6457 " Expect.equals(10, obj.bar2(10));\n" 6462 " Expect.equals(10, obj.bar2(10));\n"
6458 "\n" 6463 "\n"
6459 " Expect.equals(10001, obj.foo3());\n" 6464 " Expect.equals(10001, obj.foo3());\n"
6460 " Expect.equals(10001, obj.bar30());\n" 6465 " Expect.equals(10001, obj.bar30());\n"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
6579 " int bar30() { var func = foo3; return func(); }\n" 6584 " int bar30() { var func = foo3; return func(); }\n"
6580 " int bar31(int i) { var func = foo3; return func(i); }\n" 6585 " int bar31(int i) { var func = foo3; return func(i); }\n"
6581 " int bar32(int i, int j) { var func = foo3; return func(i, j); }\n" 6586 " int bar32(int i, int j) { var func = foo3; return func(i, j); }\n"
6582 " int bar41(int i) {\n" 6587 " int bar41(int i) {\n"
6583 " var func = foo4; return func(i); }\n" 6588 " var func = foo4; return func(i); }\n"
6584 " int bar42(int i, int j) {\n" 6589 " int bar42(int i, int j) {\n"
6585 " var func = foo4; return func(i, j); }\n" 6590 " var func = foo4; return func(i, j); }\n"
6586 " int bar43(int i, int j, int k) {\n" 6591 " int bar43(int i, int j, int k) {\n"
6587 " var func = foo4; return func(i, j, k); }\n" 6592 " var func = foo4; return func(i, j, k); }\n"
6588 "}\n" 6593 "}\n"
6594 "class Expect {\n"
6595 " static void equals(x, y) {\n"
6596 " if (x != y) throw new Error('not equal');\n"
6597 " }\n"
6598 "}\n"
6589 "int testMain() {\n" 6599 "int testMain() {\n"
6590 " Test obj = new Test();\n" 6600 " Test obj = new Test();\n"
6591 " Expect.equals(0, Test.foo1());\n" 6601 " Expect.equals(0, Test.foo1());\n"
6592 " Expect.equals(0, obj.bar1());\n" 6602 " Expect.equals(0, obj.bar1());\n"
6593 "\n" 6603 "\n"
6594 " Expect.equals(10, Test.foo2(10));\n" 6604 " Expect.equals(10, Test.foo2(10));\n"
6595 " Expect.equals(10, obj.bar2(10));\n" 6605 " Expect.equals(10, obj.bar2(10));\n"
6596 "\n" 6606 "\n"
6597 " Expect.equals(10001, Test.foo3());\n" 6607 " Expect.equals(10001, Test.foo3());\n"
6598 " Expect.equals(10001, obj.bar30());\n" 6608 " Expect.equals(10001, obj.bar30());\n"
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
7339 NULL); 7349 NULL);
7340 int64_t value = 0; 7350 int64_t value = 0;
7341 result = Dart_IntegerToInt64(result, &value); 7351 result = Dart_IntegerToInt64(result, &value);
7342 EXPECT_VALID(result); 7352 EXPECT_VALID(result);
7343 EXPECT_EQ(260, value); 7353 EXPECT_EQ(260, value);
7344 } 7354 }
7345 7355
7346 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 7356 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
7347 7357
7348 } // namespace dart 7358 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698