Removed files that were missed during migration and fixed status file.

Migrated test block 29 to Dart 2.0

-Spit string_test into string_test and string_static_test
-Added various MissingCompileTimeError entries in status files for
tests which throw exceptions on configurations that haven't implemented Dart 2.0
-Switched var -> dynamic in symbol_operator_test

TBR=jcollins@google.com
BUG=

Review-Url: https://codereview.chromium.org/2984893002 .
This commit is contained in:
Ben Konyi
2017-07-22 20:43:54 -07:00
parent 3867d84ca5
commit 8247191e28
3 changed files with 3 additions and 214 deletions
+3
View File
@@ -15,6 +15,9 @@ string_from_environment2_test: Skip
string_from_environment3_test: Skip
string_from_environment_test: Skip
[ $compiler == none || $compiler == precompiler || $compiler == app_jit ]
string_case_test/01: Fail # Bug 18061
[ $compiler == dart2js ]
int_parse_radix_test/01: Pass, Fail # JS implementations disagree on U+0085 being whitespace.
int_parse_radix_test/02: Fail # No bigints.
@@ -1,124 +0,0 @@
// Copyright (c) 2014, 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.
import "package:expect/expect.dart";
void checkBadSymbol(String s) {
Expect.throws(() => new Symbol(s), (e) => e is ArgumentError);
}
main() {
var x;
// 'void' is allowed as a symbol name.
x = const Symbol('void'); // //# 01: ok
x = #void; // //# 02: ok
x = new Symbol('void'); // //# 03: ok
// However, it is not allowed as a part of a symbol name.
x = const Symbol('void.foo'); // //# 04: compile-time error
Expect.throws(() { x = #void.foo; }, (e) => e is NoSuchMethodError); //# 05: static type warning
checkBadSymbol('void.foo'); // //# 06: ok
x = const Symbol('foo.void'); // //# 07: compile-time error
x = #foo.void; // //# 08: compile-time error
checkBadSymbol('foo.void'); // //# 09: ok
// All other reserved words are disallowed.
x = const Symbol('assert'); // //# 10: compile-time error
x = const Symbol('break'); // //# 10: continued
x = const Symbol('case'); // //# 10: continued
x = const Symbol('catch'); // //# 10: continued
x = const Symbol('class'); // //# 10: continued
x = const Symbol('const'); // //# 10: continued
x = const Symbol('continue'); // //# 10: continued
x = const Symbol('default'); // //# 10: continued
x = const Symbol('do'); // //# 10: continued
x = const Symbol('else'); // //# 10: continued
x = const Symbol('enum'); // //# 10: continued
x = const Symbol('extends'); // //# 10: continued
x = const Symbol('false'); // //# 10: continued
x = const Symbol('final'); // //# 10: continued
x = const Symbol('finally'); // //# 10: continued
x = const Symbol('for'); // //# 10: continued
x = const Symbol('if'); // //# 10: continued
x = const Symbol('in'); // //# 10: continued
x = const Symbol('is'); // //# 10: continued
x = const Symbol('new'); // //# 10: continued
x = const Symbol('null'); // //# 10: continued
x = const Symbol('rethrow'); // //# 10: continued
x = const Symbol('return'); // //# 10: continued
x = const Symbol('super'); // //# 10: continued
x = const Symbol('switch'); // //# 10: continued
x = const Symbol('this'); // //# 10: continued
x = const Symbol('throw'); // //# 10: continued
x = const Symbol('true'); // //# 10: continued
x = const Symbol('try'); // //# 10: continued
x = const Symbol('var'); // //# 10: continued
x = const Symbol('while'); // //# 10: continued
x = const Symbol('with'); // //# 10: continued
x = #assert; // //# 11: compile-time error
x = #break; // //# 11: continued
x = #case; // //# 11: continued
x = #catch; // //# 11: continued
x = #class; // //# 11: continued
x = #const; // //# 11: continued
x = #continue; // //# 11: continued
x = #default; // //# 11: continued
x = #do; // //# 11: continued
x = #else; // //# 11: continued
x = #enum; // //# 11: continued
x = #extends; // //# 11: continued
x = #false; // //# 11: continued
x = #final; // //# 11: continued
x = #finally; // //# 11: continued
x = #for; // //# 11: continued
x = #if; // //# 11: continued
x = #in; // //# 11: continued
x = #is; // //# 11: continued
x = #new; // //# 11: continued
x = #null; // //# 11: continued
x = #rethrow; // //# 11: continued
x = #return; // //# 11: continued
x = #super; // //# 11: continued
x = #switch; // //# 11: continued
x = #this; // //# 11: continued
x = #throw; // //# 11: continued
x = #true; // //# 11: continued
x = #try; // //# 11: continued
x = #var; // //# 11: continued
x = #while; // //# 11: continued
x = #with; // //# 11: continued
checkBadSymbol('assert'); // //# 12: ok
checkBadSymbol('break'); // //# 12: continued
checkBadSymbol('case'); // //# 12: continued
checkBadSymbol('catch'); // //# 12: continued
checkBadSymbol('class'); // //# 12: continued
checkBadSymbol('const'); // //# 12: continued
checkBadSymbol('continue'); // //# 12: continued
checkBadSymbol('default'); // //# 12: continued
checkBadSymbol('do'); // //# 12: continued
checkBadSymbol('else'); // //# 12: continued
checkBadSymbol('enum'); // //# 12: continued
checkBadSymbol('extends'); // //# 12: continued
checkBadSymbol('false'); // //# 12: continued
checkBadSymbol('final'); // //# 12: continued
checkBadSymbol('finally'); // //# 12: continued
checkBadSymbol('for'); // //# 12: continued
checkBadSymbol('if'); // //# 12: continued
checkBadSymbol('in'); // //# 12: continued
checkBadSymbol('is'); // //# 12: continued
checkBadSymbol('new'); // //# 12: continued
checkBadSymbol('null'); // //# 12: continued
checkBadSymbol('rethrow'); // //# 12: continued
checkBadSymbol('return'); // //# 12: continued
checkBadSymbol('super'); // //# 12: continued
checkBadSymbol('switch'); // //# 12: continued
checkBadSymbol('this'); // //# 12: continued
checkBadSymbol('throw'); // //# 12: continued
checkBadSymbol('true'); // //# 12: continued
checkBadSymbol('try'); // //# 12: continued
checkBadSymbol('var'); // //# 12: continued
checkBadSymbol('while'); // //# 12: continued
checkBadSymbol('with'); // //# 12: continued
}
-90
View File
@@ -1,90 +0,0 @@
// Copyright (c) 2013, 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.
// Basic test of Symbol class.
main() {
var x;
print(x = const Symbol('fisk'));
try {
print(const Symbol(0)); //# 01: compile-time error
} on NoSuchMethodError {
print('Caught NoSuchMethodError');
} on TypeError {
print('Caught TypeError');
}
try {
print(const Symbol('0')); //# 02: compile-time error
} on ArgumentError catch (e) {
print('Caught $e');
}
try {
print(const Symbol('_')); //# 03: compile-time error
} on ArgumentError catch (e) {
print('Caught $e');
}
try {
var y = 0;
print(new Symbol(y));
throw 'Expected a NoSuchMethodError or a TypeError';
} on NoSuchMethodError {
print('Caught NoSuchMethodError');
} on TypeError {
print('Caught TypeError');
}
try {
print(new Symbol('0'));
throw 'Expected an ArgumentError';
} on ArgumentError catch (e) {
print('Caught $e');
}
try {
print(new Symbol('_'));
throw 'Expected an ArgumentError';
} on ArgumentError catch (e) {
print('Caught $e');
}
if (!identical(const Symbol('fisk'), x)) {
throw 'Symbol constant is not canonicalized';
}
if (const Symbol('fisk') != x) {
throw 'Symbol constant is not equal to itself';
}
if (const Symbol('fisk') != new Symbol('fisk')) {
throw 'Symbol constant is not equal to its non-const equivalent';
}
if (new Symbol('fisk') != new Symbol('fisk')) {
throw 'new Symbol is not equal to its equivalent';
}
if (new Symbol('fisk') == new Symbol('hest')) {
throw 'unrelated Symbols are equal';
}
if (new Symbol('fisk') == new Object()) {
throw 'unrelated objects are equal';
}
x.hashCode as int;
new Symbol('fisk').hashCode as int;
if (new Symbol('fisk').hashCode != x.hashCode) {
throw "non-const Symbol's hashCode not equal to its const equivalent";
}
if (new Symbol('') != const Symbol('')) {
throw 'empty Symbol not equals to itself';
}
}