Migrate tests off the ancient multitest marker syntax.
Change-Id: Iae025d9c544831e24debf0a670202ced8f252a97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106201
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
diff --git a/tests/compiler/dart2js/async_await/async_await_js_transform_test.dart b/tests/compiler/dart2js/async_await/async_await_js_transform_test.dart
index d31c169..111e57d 100644
--- a/tests/compiler/dart2js/async_await/async_await_js_transform_test.dart
+++ b/tests/compiler/dart2js/async_await/async_await_js_transform_test.dart
@@ -52,20 +52,17 @@
}
main() {
- testAsyncTransform(
-
- /// 01: ok
- r"""function() async {
+ testAsyncTransform( //# 01: ok
+ r"""function() async {
var closures = [new A.main_closure()], v0 = await closures, v1 = 0, v2, v3;
if (v1 < 0 || v1 >= v0.length)
H.ioore(v0, v1);
v2 = 4;
v3 = 2;
P.print(v0[v1].call$2(v2, v3));
-}""",
-
- /// 01: ok
- r"""function() {
+}"""
+, //# 01: ok
+ r"""function() {
var __goto = 0,
__completer = NewCompleter(CompleterType),
closures, v0, v1, v2, v3;
@@ -93,10 +90,9 @@
}
});
return startHelper(body, __completer);
-}""")
-
- /// 01: ok
- ;
+}"""
+ ) //# 01: ok
+ ;
testAsyncTransform("""
function(a) async {
@@ -439,7 +435,7 @@
while (true) {
switch(y) { // Switch with no awaits in case key expressions
case 0:
- case 1:
+ case 1:
await foo();
continue; // Continue the loop, not the switch
case 1: // Duplicate case
@@ -594,7 +590,7 @@
return;
}
print(await(foo(i)));
- }
+ }
}
""", """
function(g) {
diff --git a/tests/compiler/dart2js_extra/async_stacktrace_test.dart b/tests/compiler/dart2js_extra/async_stacktrace_test.dart
index 947e2d6..708706b 100644
--- a/tests/compiler/dart2js_extra/async_stacktrace_test.dart
+++ b/tests/compiler/dart2js_extra/async_stacktrace_test.dart
@@ -27,9 +27,8 @@
}
Future test1(Tracer tracer) {
- foo() async*
-
- /// asyncStar: ok
+ foo() async
+ * //# asyncStar: ok
{
var savedStackTrace;
try {
@@ -50,17 +49,15 @@
tracer.trace("f");
}
- return foo().toList()
-
- /// asyncStar: continued
+ return foo()
+ .toList() //# asyncStar: continued
;
}
Future test2(Tracer tracer) {
var savedStackTrace;
- foo() async*
-
- /// asyncStar: continued
+ foo() async
+ * //# asyncStar: continued
{
try {
tracer.trace("a");
@@ -74,9 +71,8 @@
tracer.trace("d");
}
- return foo().toList()
-
- /// asyncStar: continued
+ return foo()
+ .toList() //# asyncStar: continued
.catchError((e, st) {
tracer.trace("e");
Expect.equals(savedStackTrace.toString(), st.toString());
@@ -85,9 +81,8 @@
Future test3(Tracer tracer) {
var savedStackTrace;
- foo() async*
-
- /// asyncStar: continued
+ foo() async
+ * //# asyncStar: continued
{
try {
tracer.trace("a");
@@ -99,9 +94,8 @@
}
}
- return foo().toList()
-
- /// asyncStar: continued
+ return foo()
+ .toList() //# asyncStar: continued
.catchError((e, st) {
tracer.trace("c");
Expect.equals(savedStackTrace.toString(), st.toString());
diff --git a/tests/corelib_2/bigint_test.dart b/tests/corelib_2/bigint_test.dart
index 0b5b8c5..89b361b 100644
--- a/tests/corelib_2/bigint_test.dart
+++ b/tests/corelib_2/bigint_test.dart
@@ -1041,39 +1041,39 @@
main() {
for (int i = 0; i < 8; i++) {
- Expect.equals(BigInt.parse("1234567890123456789"), foo()); /// 01: ok
- Expect.equals(BigInt.parse("12345678901234567890"), bar()); /// 02: ok
- testModPow(); /// 03: ok
- testModInverse(); /// 04: ok
- testGcd(); /// 05: ok
- testSmiOverflow(); /// 06: ok
- testBigintAnd(); /// 07: ok
- testBigintOr(); /// 08: ok
- testBigintXor(); /// 09: ok
- testBigintAdd(); /// 10: ok
- testBigintSub(); /// 11: ok
- testBigintMul(); /// 12: ok
- testBigintTruncDiv(); /// 12: ok
- testBigintDiv(); /// 13: ok
- testBigintModulo(); /// 14: ok
- testBigintModPow(); /// 15: ok
- testBigintModInverse(); /// 16: ok
- testBigintGcd(); /// 17: ok
- testBigintNegate(); /// 18: ok
- testShiftAmount(); /// 19: ok
- testPow(); /// 20: ok
- testToRadixString(); /// 21: ok
- testToString(); /// 22: ok
- testFromToInt(); /// 23: ok
- testFromToDouble(); /// 24: ok
- Expect.equals(BigInt.parse("12345678901234567890"), /// 25: ok
- BigInt.parse("12345678901234567890").abs()); /// 25: ok
- Expect.equals(BigInt.parse("12345678901234567890"), /// 26: ok
- BigInt.parse("-12345678901234567890").abs()); /// 26: ok
- var a = BigInt.parse("10000000000000000000"); /// 27: ok
- var b = BigInt.parse("10000000000000000001"); /// 27: ok
- Expect.equals(false, a.hashCode == b.hashCode); /// 27: ok
- Expect.equals(true, a.hashCode == (b - BigInt.one).hashCode); /// 27: ok
+ Expect.equals(BigInt.parse("1234567890123456789"), foo()); //# 01: ok
+ Expect.equals(BigInt.parse("12345678901234567890"), bar()); //# 02: ok
+ testModPow(); //# 03: ok
+ testModInverse(); //# 04: ok
+ testGcd(); //# 05: ok
+ testSmiOverflow(); //# 06: ok
+ testBigintAnd(); //# 07: ok
+ testBigintOr(); //# 08: ok
+ testBigintXor(); //# 09: ok
+ testBigintAdd(); //# 10: ok
+ testBigintSub(); //# 11: ok
+ testBigintMul(); //# 12: ok
+ testBigintTruncDiv(); //# 12: ok
+ testBigintDiv(); //# 13: ok
+ testBigintModulo(); //# 14: ok
+ testBigintModPow(); //# 15: ok
+ testBigintModInverse(); //# 16: ok
+ testBigintGcd(); //# 17: ok
+ testBigintNegate(); //# 18: ok
+ testShiftAmount(); //# 19: ok
+ testPow(); //# 20: ok
+ testToRadixString(); //# 21: ok
+ testToString(); //# 22: ok
+ testFromToInt(); //# 23: ok
+ testFromToDouble(); //# 24: ok
+ Expect.equals(BigInt.parse("12345678901234567890"), //# 25: ok
+ BigInt.parse("12345678901234567890").abs()); //# 25: ok
+ Expect.equals(BigInt.parse("12345678901234567890"), //# 26: ok
+ BigInt.parse("-12345678901234567890").abs()); //# 26: ok
+ var a = BigInt.parse("10000000000000000000"); //# 27: ok
+ var b = BigInt.parse("10000000000000000001"); //# 27: ok
+ Expect.equals(false, a.hashCode == b.hashCode); //# 27: ok
+ Expect.equals(true, a.hashCode == (b - BigInt.one).hashCode); //# 27: ok
// Regression test for http://dartbug.com/36105
var overbig = -BigInt.from(10).pow(309);
diff --git a/tests/language_2/compile_time_constant13_test.dart b/tests/language_2/compile_time_constant13_test.dart
index 970e805..189abbd 100644
--- a/tests/language_2/compile_time_constant13_test.dart
+++ b/tests/language_2/compile_time_constant13_test.dart
@@ -3,18 +3,18 @@
// BSD-style license that can be found in the LICENSE file.
class A {
- final x; // //# 01: ok
- /// 02: compile-time error
- var x; // //# 03: compile-time error
+ final x; //# 01: ok
+ //# 02: compile-time error
+ var x; //# 03: compile-time error
get x => null; //# 04: compile-time error
- set x(v) {} // //# 05: compile-time error
+ set x(v) {} //# 05: compile-time error
const A()
- : x = 'foo' // //# 01: continued
- : x = 'foo' // //# 02: continued
- : x = 'foo' // //# 03: continued
- : x = 'foo' // //# 04: continued
- : x = 'foo' // //# 05: continued
+ : x = 'foo' //# 01: continued
+ : x = 'foo' //# 02: continued
+ : x = 'foo' //# 03: continued
+ : x = 'foo' //# 04: continued
+ : x = 'foo' //# 05: continued
;
}
diff --git a/tests/language_2/function_type_in_constant_test.dart b/tests/language_2/function_type_in_constant_test.dart
index 53aed9c..ca9db12 100644
--- a/tests/language_2/function_type_in_constant_test.dart
+++ b/tests/language_2/function_type_in_constant_test.dart
@@ -18,12 +18,6 @@
main() {
test(const A<int Function()>(), const A<String Function()>());
-
- /// 01: ok
test(const A<int>(), const A<String Function()>());
-
- /// 02: ok
test(const A<int Function()>(), const A<String>());
-
- /// 03: ok
}
diff --git a/tests/language_2/vm/regress_33469_test.dart b/tests/language_2/vm/regress_33469_test.dart
index a18a6ad..831704e 100644
--- a/tests/language_2/vm/regress_33469_test.dart
+++ b/tests/language_2/vm/regress_33469_test.dart
@@ -8,8 +8,8 @@
}
void main() {
- print(const X(1 << -1).x); /// 01: compile-time error
- print(const X(1 >> -1).x); /// 02: compile-time error
- print(const X(1 % 0).x); /// 03: compile-time error
- print(const X(1 ~/ 0).x); /// 04: compile-time error
+ print(const X(1 << -1).x); //# 01: compile-time error
+ print(const X(1 >> -1).x); //# 02: compile-time error
+ print(const X(1 % 0).x); //# 03: compile-time error
+ print(const X(1 ~/ 0).x); //# 04: compile-time error
}
diff --git a/tests/language_2/vm/symbols_test.dart b/tests/language_2/vm/symbols_test.dart
index 15f9ed1..a68e2f4 100644
--- a/tests/language_2/vm/symbols_test.dart
+++ b/tests/language_2/vm/symbols_test.dart
@@ -5,15 +5,15 @@
import 'package:expect/expect.dart';
void main() {
- print(const Symbol(null)); /// 01: compile-time error
- print(const Symbol(r'')); /// 02: ok
- Expect.isTrue(identical(const Symbol(r'foo'), #foo)); /// 03: ok
- Expect.isTrue(identical(const Symbol(r'$foo'), #$foo)); /// 03: ok
- Expect.isTrue(identical(const Symbol(r'$_'), #$_)); /// 03: ok
- Expect.isTrue(identical(const Symbol(r'+'), #+)); /// 03: ok
- Expect.isTrue(identical(const Symbol(r'[]='), #[]=)); /// 03: ok
- Expect.isTrue(identical(const Symbol(r'_foo'), #_foo)); /// 03: compile-time error
- Expect.isTrue(identical(const Symbol(r'_$'), #_$)); /// 03: compile-time error
- Expect.isTrue(identical(const Symbol(r'_foo$'), #_foo$)); /// 03: compile-time error
- print(const Symbol(r'_+')); /// 03: compile-time error
+ print(const Symbol(null)); //# 01: compile-time error
+ print(const Symbol(r'')); //# 02: ok
+ Expect.isTrue(identical(const Symbol(r'foo'), #foo)); //# 03: ok
+ Expect.isTrue(identical(const Symbol(r'$foo'), #$foo)); //# 03: ok
+ Expect.isTrue(identical(const Symbol(r'$_'), #$_)); //# 03: ok
+ Expect.isTrue(identical(const Symbol(r'+'), #+)); //# 03: ok
+ Expect.isTrue(identical(const Symbol(r'[]='), #[]=)); //# 03: ok
+ Expect.isTrue(identical(const Symbol(r'_foo'), #_foo)); //# 03: compile-time error
+ Expect.isTrue(identical(const Symbol(r'_$'), #_$)); //# 03: compile-time error
+ Expect.isTrue(identical(const Symbol(r'_foo$'), #_foo$)); //# 03: compile-time error
+ print(const Symbol(r'_+')); //# 03: compile-time error
}