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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 13724021: Remove deprecated Expect from the libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Rebase. Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/core/core.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl_test.cc
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index f00f6cd39522a2110d6a9812e227ae1e945da8d6..7cb0bba0d3256e6c9be8a24f4e14dea2389e768b 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -906,6 +906,13 @@ static Dart_NativeFunction ByteDataNativeResolver(Dart_Handle name,
TEST_CASE(ByteDataAccess) {
const char* kScriptChars =
"import 'dart:typeddata';\n"
+ "class Expect {\n"
+ " static equals(a, b) {\n"
+ " if (a != b) {\n"
+ " throw 'not equal. expected: $a, got: $b';\n"
+ " }\n"
+ " }\n"
+ "}\n"
"ByteData createByteData() native 'CreateByteData';"
"ByteData main() {"
" var length = 16;"
@@ -961,6 +968,13 @@ TEST_CASE(ExternalByteDataAccess) {
// appropriate getter instead of the host endian format used now.
const char* kScriptChars =
"import 'dart:typeddata';\n"
+ "class Expect {\n"
+ " static equals(a, b) {\n"
+ " if (a != b) {\n"
+ " throw 'not equal. expected: $a, got: $b';\n"
+ " }\n"
+ " }\n"
+ "}\n"
"ByteData createExternalByteData() native 'CreateExternalByteData';"
"ByteData main() {"
" var length = 16;"
@@ -1073,6 +1087,13 @@ static void TestDirectAccess(Dart_Handle lib,
TEST_CASE(TypedDataDirectAccess1) {
const char* kScriptChars =
"import 'dart:typeddata';\n"
+ "class Expect {\n"
+ " static equals(a, b) {\n"
+ " if (a != b) {\n"
+ " throw new Exception('not equal. expected: $a, got: $b');\n"
+ " }\n"
+ " }\n"
+ "}\n"
"void setMain(var a) {"
" for (var i = 0; i < 10; i++) {"
" a[i] = i;"
@@ -1113,6 +1134,13 @@ TEST_CASE(TypedDataDirectAccess1) {
TEST_CASE(TypedDataViewDirectAccess) {
const char* kScriptChars =
"import 'dart:typeddata';\n"
+ "class Expect {\n"
+ " static equals(a, b) {\n"
+ " if (a != b) {\n"
+ " throw 'not equal. expected: $a, got: $b';\n"
+ " }\n"
+ " }\n"
+ "}\n"
"void setMain(var list) {"
" Expect.equals(10, list.length);"
" for (var i = 0; i < 10; i++) {"
@@ -1145,6 +1173,13 @@ TEST_CASE(TypedDataViewDirectAccess) {
TEST_CASE(ByteDataDirectAccess) {
const char* kScriptChars =
"import 'dart:typeddata';\n"
+ "class Expect {\n"
+ " static equals(a, b) {\n"
+ " if (a != b) {\n"
+ " throw 'not equal. expected: $a, got: $b';\n"
+ " }\n"
+ " }\n"
+ "}\n"
"void setMain(var list) {"
" Expect.equals(10, list.length);"
" for (var i = 0; i < 10; i++) {"
@@ -6649,8 +6684,10 @@ TEST_CASE(NativeFunctionClosure) {
" var func = foo4; return func(i, j, k); }\n"
"}\n"
"class Expect {\n"
- " static void equals(x, y) {\n"
- " if (x != y) throw new Error('not equal');\n"
+ " static equals(a, b) {\n"
+ " if (a != b) {\n"
+ " throw 'not equal. expected: $a, got: $b';\n"
+ " }\n"
" }\n"
"}\n"
"int testMain() {\n"
@@ -6792,8 +6829,10 @@ TEST_CASE(NativeStaticFunctionClosure) {
" var func = foo4; return func(i, j, k); }\n"
"}\n"
"class Expect {\n"
- " static void equals(x, y) {\n"
- " if (x != y) throw new Error('not equal');\n"
+ " static equals(a, b) {\n"
+ " if (a != b) {\n"
+ " throw 'not equal. expected: $a, got: $b';\n"
+ " }\n"
" }\n"
"}\n"
"int testMain() {\n"
« no previous file with comments | « no previous file | sdk/lib/core/core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698