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

Unified Diff: tests/language/vm/type_vm_test.dart

Issue 772513003: Revert r42145 to fix co19 tests (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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 | « tests/language/bool_check_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/vm/type_vm_test.dart
===================================================================
--- tests/language/vm/type_vm_test.dart (revision 42146)
+++ tests/language/vm/type_vm_test.dart (working copy)
@@ -1,7 +1,7 @@
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// VMOptions=--enable_type_checks --enable_asserts --no_show_internal_names
+// VMOptions=--enable_type_checks --no_show_internal_names
// Dart test program testing type checks.
import "package:expect/expect.dart";
@@ -266,13 +266,15 @@
"type_vm_test.dart:258:20"));
}
try {
- if (null) {}; // Throws an AssertionError if assertions are enabled.
- } on AssertionError catch (error) {
+ if (null) {}; // Throws a TypeError if type checks are enabled.
+ } on TypeError catch (error) {
result++;
var msg = error.toString();
- Expect.isTrue(msg.contains("assertion"));
- Expect.isTrue(msg.contains("boolean expression"));
- Expect.isTrue(msg.contains("null"));
+ Expect.isTrue(msg.contains("'bool'")); // dstType
+ Expect.isTrue(msg.contains("'Null'")); // srcType
+ Expect.isTrue(msg.contains("boolean expression")); // dstName
+ Expect.isTrue(error.stackTrace.toString().contains(
+ "type_vm_test.dart:269:11"));
}
return result;
}
@@ -317,7 +319,7 @@
Expect.isTrue(msg.contains("'List<Object>'")); // srcType
Expect.isTrue(msg.contains("'ai'")); // dstName
Expect.isTrue(error.stackTrace.toString().contains(
- "type_vm_test.dart:312:24"));
+ "type_vm_test.dart:314:24"));
}
try {
List<num> an = a;
@@ -328,7 +330,7 @@
Expect.isTrue(msg.contains("'List<Object>'")); // srcType
Expect.isTrue(msg.contains("'an'")); // dstName
Expect.isTrue(error.stackTrace.toString().contains(
- "type_vm_test.dart:323:24"));
+ "type_vm_test.dart:325:24"));
}
try {
List<String> as = a;
@@ -339,7 +341,7 @@
Expect.isTrue(msg.contains("'List<Object>'")); // srcType
Expect.isTrue(msg.contains("'as'")); // dstName
Expect.isTrue(error.stackTrace.toString().contains(
- "type_vm_test.dart:334:27"));
+ "type_vm_test.dart:336:27"));
}
}
{
@@ -357,7 +359,7 @@
Expect.isTrue(msg.contains("'List<int>'")); // srcType
Expect.isTrue(msg.contains("'as'")); // dstName
Expect.isTrue(error.stackTrace.toString().contains(
- "type_vm_test.dart:352:27"));
+ "type_vm_test.dart:354:27"));
}
}
{
@@ -373,7 +375,7 @@
Expect.isTrue(msg.contains("'List<num>'")); // srcType
Expect.isTrue(msg.contains("'ai'")); // dstName
Expect.isTrue(error.stackTrace.toString().contains(
- "type_vm_test.dart:368:24"));
+ "type_vm_test.dart:370:24"));
}
List<num> an = a;
try {
@@ -385,7 +387,7 @@
Expect.isTrue(msg.contains("'List<num>'")); // srcType
Expect.isTrue(msg.contains("'as'")); // dstName
Expect.isTrue(error.stackTrace.toString().contains(
- "type_vm_test.dart:380:27"));
+ "type_vm_test.dart:382:27"));
}
}
{
@@ -401,7 +403,7 @@
Expect.isTrue(msg.contains("'List<String>'")); // srcType
Expect.isTrue(msg.contains("'ai'")); // dstName
Expect.isTrue(error.stackTrace.toString().contains(
- "type_vm_test.dart:396:24"));
+ "type_vm_test.dart:398:24"));
}
try {
List<num> an = a;
@@ -412,7 +414,7 @@
Expect.isTrue(msg.contains("'List<String>'")); // srcType
Expect.isTrue(msg.contains("'an'")); // dstName
Expect.isTrue(error.stackTrace.toString().contains(
- "type_vm_test.dart:407:24"));
+ "type_vm_test.dart:409:24"));
}
List<String> as = a;
}
« no previous file with comments | « tests/language/bool_check_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698