diff --git a/pkg/dev_compiler/test/multitest.dart b/pkg/dev_compiler/test/multitest.dart index 7451bfb05c4..6d9acd7e033 100644 --- a/pkg/dev_compiler/test/multitest.dart +++ b/pkg/dev_compiler/test/multitest.dart @@ -15,11 +15,8 @@ final validMultitestOutcomes = new Set.from([ 'checked mode compile-time error' ]); -// Require at least one non-space character before '//#' -// Handle both //# and the legacy /// multitest regexp patterns. -final _multiTestRegExp = new RegExp(r"\S *//[#/] \w+:(.*)"); - -final _multiTestRegExpSeperator = new RegExp(r"//[#/]"); +// Require at least one non-space character before '///' +final _multiTestRegExp = new RegExp(r"\S */// \w+:(.*)"); bool isMultiTest(String contents) => _multiTestRegExp.hasMatch(contents); @@ -40,10 +37,10 @@ bool isMultiTest(String contents) => _multiTestRegExp.hasMatch(contents); // // For example: file I_am_a_multitest.dart // aaa -// bbb //# 02: runtime error -// ccc //# 02: continued -// ddd //# 07: static type warning -// eee //# 10: ok +// bbb /// 02: runtime error +// ccc /// 02: continued +// ddd /// 07: static type warning +// eee /// 10: ok // fff // // should create four tests: @@ -53,24 +50,24 @@ bool isMultiTest(String contents) => _multiTestRegExp.hasMatch(contents); // // I_am_a_multitest_02.dart // aaa -// bbb //# 02: runtime error -// ccc //# 02: continued +// bbb /// 02: runtime error +// ccc /// 02: continued // fff // // I_am_a_multitest_07.dart // aaa -// ddd //# 07: static type warning +// ddd /// 07: static type warning // fff // // and I_am_a_multitest_10.dart // aaa -// eee //# 10: ok +// eee /// 10: ok // fff // // Note that it is possible to indicate more than one acceptable outcome // in the case of dynamic and static type warnings // aaa -// ddd //# 07: static type warning, dynamic type error +// ddd /// 07: static type warning, dynamic type error // fff void extractTestsFromMultitest(String filePath, String contents, @@ -145,7 +142,7 @@ void extractTestsFromMultitest(String filePath, String contents, } } -// Represents a mutlitest annotation in the special //# comment. +// Represents a mutlitest annotation in the special /// comment. class _Annotation { String key; String rest; @@ -154,11 +151,11 @@ class _Annotation { factory _Annotation.from(String line) { // Do an early return with "null" if this is not a valid multitest // annotation. - if (!line.contains(_multiTestRegExpSeperator)) { + if (!line.contains('///')) { return null; } var parts = line - .split(_multiTestRegExpSeperator)[1] + .split('///')[1] .split(':') .map((s) => s.trim()) .where((s) => s.length > 0) diff --git a/pkg/testing/lib/src/multitest.dart b/pkg/testing/lib/src/multitest.dart index 913ec2867ce..5d4d1232071 100644 --- a/pkg/testing/lib/src/multitest.dart +++ b/pkg/testing/lib/src/multitest.dart @@ -4,13 +4,19 @@ library testing.multitest; -import 'dart:async' show Stream, StreamTransformer; +import 'dart:async' show + Stream, + StreamTransformer; -import 'dart:io' show Directory, File; +import 'dart:io' show + Directory, + File; -import 'log.dart' show splitLines; +import 'log.dart' show + splitLines; -import 'test_description.dart' show TestDescription; +import 'test_description.dart' show + TestDescription; bool isError(Set expectations) { if (expectations.contains("compile-time error")) return true; @@ -26,17 +32,16 @@ bool isCheckedModeError(Set expectations) { class MultitestTransformer implements StreamTransformer { - static RegExp multitestMarker = new RegExp(r"//[#/]"); - static int _multitestMarkerLength = 3; + static const String multitestMarker = "///"; static const List validOutcomesList = const [ - "ok", - "compile-time error", - "runtime error", - "static type warning", - "dynamic type error", - "checked mode compile-time error", - ]; + "ok", + "compile-time error", + "runtime error", + "static type warning", + "dynamic type error", + "checked mode compile-time error", + ]; static final Set validOutcomes = new Set.from(validOutcomesList); @@ -47,9 +52,7 @@ class MultitestTransformer errors.add(error); print(error); } - - nextTest: - await for (TestDescription test in stream) { + nextTest: await for (TestDescription test in stream) { String contents = await test.file.readAsString(); if (!contents.contains(multitestMarker)) { yield test; @@ -71,23 +74,20 @@ class MultitestTransformer List subtestOutcomesList; if (index != -1) { String annotationText = - line.substring(index + _multitestMarkerLength).trim(); + line.substring(index + multitestMarker.length).trim(); index = annotationText.indexOf(":"); if (index != -1) { subtestName = annotationText.substring(0, index).trim(); - subtestOutcomesList = annotationText - .substring(index + 1) - .split(",") - .map((s) => s.trim()) - .toList(); + subtestOutcomesList = annotationText.substring(index + 1).split(",") + .map((s) => s.trim()).toList(); if (subtestName == "none") { reportError(test.formatError( - "$lineNumber: $subtestName can't be used as test name.")); + "$lineNumber: $subtestName can't be used as test name.")); continue nextTest; } if (subtestOutcomesList.isEmpty) { - reportError(test - .formatError("$lineNumber: Expected :")); + reportError(test.formatError( + "$lineNumber: Expected :")); continue nextTest; } } @@ -96,8 +96,8 @@ class MultitestTransformer List lines = testsAsLines.putIfAbsent(subtestName, () => new List.from(linesWithoutAnnotations)); lines.add(line); - Set subtestOutcomes = - outcomes.putIfAbsent(subtestName, () => new Set()); + Set subtestOutcomes = outcomes.putIfAbsent(subtestName, + () => new Set()); if (subtestOutcomesList.length != 1 || subtestOutcomesList.single != "continued") { for (String outcome in subtestOutcomesList) { @@ -105,7 +105,7 @@ class MultitestTransformer subtestOutcomes.add(outcome); } else { reportError(test.formatError( - "$lineNumber: '$outcome' isn't a recognized outcome.")); + "$lineNumber: '$outcome' isn't a recognized outcome.")); continue nextTest; } } diff --git a/tests/compiler/dart2js_extra/23486_test.dart b/tests/compiler/dart2js_extra/23486_test.dart index 057facee165..824a050dfb0 100644 --- a/tests/compiler/dart2js_extra/23486_test.dart +++ b/tests/compiler/dart2js_extra/23486_test.dart @@ -16,7 +16,7 @@ class B { class A extends B { m() { - (super).field = 1; //# 01: compile-time error + (super).field = 1; /// 01: compile-time error } } @@ -27,12 +27,12 @@ class C { class D extends C { D() : super(); - D.name() : (super).name(); //# 02: compile-time error + D.name() : (super).name(); /// 02: compile-time error } main() { - Expect.throws(new A().m); // //# 01: continued - Expect.throws(() => new D.name()); //# 02: continued - Expect.throws(() => (p).x); // //# 03: compile-time error + Expect.throws(new A().m); // /// 01: continued + Expect.throws(() => new D.name()); /// 02: continued + Expect.throws(() => (p).x); // /// 03: compile-time error } diff --git a/tests/compiler/dart2js_extra/LayoutTests_fast_mediastream_getusermedia_t01_test.dart b/tests/compiler/dart2js_extra/LayoutTests_fast_mediastream_getusermedia_t01_test.dart index 3ca943bb1b2..95022467894 100644 --- a/tests/compiler/dart2js_extra/LayoutTests_fast_mediastream_getusermedia_t01_test.dart +++ b/tests/compiler/dart2js_extra/LayoutTests_fast_mediastream_getusermedia_t01_test.dart @@ -10,7 +10,7 @@ foo() {} gotStream1(stream) { foo() - . //# 01: compile-time error + . /// 01: compile-time error .then(); } diff --git a/tests/compiler/dart2js_extra/basic_class_test.dart b/tests/compiler/dart2js_extra/basic_class_test.dart index c694ab67574..3ed652d1042 100644 --- a/tests/compiler/dart2js_extra/basic_class_test.dart +++ b/tests/compiler/dart2js_extra/basic_class_test.dart @@ -17,11 +17,11 @@ void main() { B b; a = a; a = subA; - a = b; //# 01: static type warning + a = b; /// 01: static type warning subA = a; subA = subA; - subA = b; //# 02: static type warning - b = a; //# 03: static type warning - b = subA; //# 04: static type warning + subA = b; /// 02: static type warning + b = a; /// 03: static type warning + b = subA; /// 04: static type warning b = b; } diff --git a/tests/compiler/dart2js_extra/bounds_check_test.dart b/tests/compiler/dart2js_extra/bounds_check_test.dart index 99223c8db82..cfc79d62506 100644 --- a/tests/compiler/dart2js_extra/bounds_check_test.dart +++ b/tests/compiler/dart2js_extra/bounds_check_test.dart @@ -4,14 +4,14 @@ main() { var a = [0, 1]; - a[-1]; // //# 01: runtime error - a[-1] = 4; // //# 02: runtime error - a[2]; // //# 03: runtime error - a[2] = 4; // //# 04: runtime error - checkIndex(a, -1); // //# 05: runtime error - checkIndexedAssignment(a, -1); // //# 06: runtime error - checkIndex(a, 2); // //# 07: runtime error - checkIndexedAssignment(a, 2); // //# 08: runtime error + a[-1]; // /// 01: runtime error + a[-1] = 4; // /// 02: runtime error + a[2]; // /// 03: runtime error + a[2] = 4; // /// 04: runtime error + checkIndex(a, -1); // /// 05: runtime error + checkIndexedAssignment(a, -1); // /// 06: runtime error + checkIndex(a, 2); // /// 07: runtime error + checkIndexedAssignment(a, 2); // /// 08: runtime error checkIndex(a, 0); checkIndexedAssignment(a, 0); } diff --git a/tests/compiler/dart2js_extra/compile_time_constant4_test.dart b/tests/compiler/dart2js_extra/compile_time_constant4_test.dart index 4effc854e14..5008b78a790 100644 --- a/tests/compiler/dart2js_extra/compile_time_constant4_test.dart +++ b/tests/compiler/dart2js_extra/compile_time_constant4_test.dart @@ -10,22 +10,22 @@ const g1 = x + "bar" ; const g2 = x - + null // //# 01: compile-time error + + null // /// 01: compile-time error ; const g3 = x - + 499 // //# 02: compile-time error + + 499 // /// 02: compile-time error ; const g4 = x - + 3.3 // //# 03: compile-time error + + 3.3 // /// 03: compile-time error ; const g5 = x - + true // //# 04: compile-time error + + true // /// 04: compile-time error ; const g6 = x - + false // //# 05: compile-time error + + false // /// 05: compile-time error ; const g7 = "foo" - + x[0] // //# 06: compile-time error + + x[0] // /// 06: compile-time error ; const g8 = 1 + x.length diff --git a/tests/compiler/dart2js_extra/constant_javascript_semantics_test.dart b/tests/compiler/dart2js_extra/constant_javascript_semantics_test.dart index 094cd95bbac..94f9300064a 100644 --- a/tests/compiler/dart2js_extra/constant_javascript_semantics_test.dart +++ b/tests/compiler/dart2js_extra/constant_javascript_semantics_test.dart @@ -11,10 +11,10 @@ const y = 12345678901234567890; const z = x - y; const a = 1.0; -const b = a << 3; // //# 01: compile-time error +const b = a << 3; // /// 01: compile-time error const c = -0.0; -const d = c << 1; // //# 02: compile-time error +const d = c << 1; // /// 02: compile-time error foo() => 12345678901234567891 - 12345678901234567890; @@ -24,11 +24,11 @@ main() { Expect.equals(0, foo()); Expect.isTrue(x is double); Expect.isTrue(x is int); - Expect.equals(8, b); // //# 01: continued - Expect.equals(8, 1.0 << 3); // //# 03: static type warning + Expect.equals(8, b); // /// 01: continued + Expect.equals(8, 1.0 << 3); // /// 03: static type warning Expect.isTrue(1 == 1.0); - Expect.equals(0, d); // //# 02: continued - Expect.equals(0, -0.0 << 1); // //# 04: static type warning + Expect.equals(0, d); // /// 02: continued + Expect.equals(0, -0.0 << 1); // /// 04: static type warning // Make sure the 1 is not shifted into the 32 bit range. Expect.equals(0, 0x100000000 >> 3); // The dynamic int-check also allows -0.0. diff --git a/tests/compiler/dart2js_extra/int_index_test.dart b/tests/compiler/dart2js_extra/int_index_test.dart index 269124ceb5b..8e90b2c1c50 100644 --- a/tests/compiler/dart2js_extra/int_index_test.dart +++ b/tests/compiler/dart2js_extra/int_index_test.dart @@ -4,10 +4,10 @@ main() { var a = [0, 1]; - a[1.2]; // //# 01: runtime error - a[1.2] = 4; // //# 02: runtime error - checkIndex(a, 1.4); //# 03: runtime error - checkIndexedAssignment(a, 1.4); //# 04: runtime error + a[1.2]; // /// 01: runtime error + a[1.2] = 4; // /// 02: runtime error + checkIndex(a, 1.4); /// 03: runtime error + checkIndexedAssignment(a, 1.4); /// 04: runtime error checkIndex(a, 0); checkIndexedAssignment(a, 0); } diff --git a/tests/compiler/dart2js_extra/invalid_annotation2_test.dart b/tests/compiler/dart2js_extra/invalid_annotation2_test.dart index eba4d33017e..22c3ee77b8c 100644 --- a/tests/compiler/dart2js_extra/invalid_annotation2_test.dart +++ b/tests/compiler/dart2js_extra/invalid_annotation2_test.dart @@ -14,7 +14,7 @@ import 'dart:mirrors'; @Deprecated("m" -,, // //# 01: compile-time error +,, // /// 01: compile-time error ) class A { } diff --git a/tests/compiler/dart2js_extra/invalid_annotation_test.dart b/tests/compiler/dart2js_extra/invalid_annotation_test.dart index eff8683921f..0752e77f0cc 100644 --- a/tests/compiler/dart2js_extra/invalid_annotation_test.dart +++ b/tests/compiler/dart2js_extra/invalid_annotation_test.dart @@ -8,7 +8,7 @@ // annotation had a syntax error. @Deprecated("m" -,, // //# 01: compile-time error +,, // /// 01: compile-time error ) class A {} diff --git a/tests/compiler/dart2js_extra/label_test.dart b/tests/compiler/dart2js_extra/label_test.dart index d31cb358441..6decfd6a547 100644 --- a/tests/compiler/dart2js_extra/label_test.dart +++ b/tests/compiler/dart2js_extra/label_test.dart @@ -4,49 +4,49 @@ // A break label must be declared where it's used. undeclaredBreakLabel1() { - foo: { break bar; break foo; } // //# 01: compile-time error + foo: { break bar; break foo; } // /// 01: compile-time error } undeclaredBreakLabel2() { - foo: while (true) { break bar; break foo; } // //# 02: compile-time error + foo: while (true) { break bar; break foo; } // /// 02: compile-time error } // An unlabeled break must be inside a loop or switch. noBreakTarget() { - foo: if (true) { break; break foo; } // //# 03: compile-time error + foo: if (true) { break; break foo; } // /// 03: compile-time error } // A continue label must be declared where it's used. undeclaredContinueLabel() { - foo: for (;;) { continue bar; break foo; } // //# 04: compile-time error + foo: for (;;) { continue bar; break foo; } // /// 04: compile-time error } // An unlabeled continue must be inside a loop. noContinueTarget() { - foo: if (true) continue; else break foo; // //# 05: compile-time error + foo: if (true) continue; else break foo; // /// 05: compile-time error } // A continue label must point to a continue-able statement. wrongContinueLabel() { - foo: if (true) continue foo; // //# 06: compile-time error + foo: if (true) continue foo; // /// 06: compile-time error } // Labels are not captured by closures. noncaptureLabel() { - foo: { // //# 07: compile-time error - (() { break foo; })(); // //# 07: continued - break foo; // //# 07: continued - } // //# 07: continued + foo: { // /// 07: compile-time error + (() { break foo; })(); // /// 07: continued + break foo; // /// 07: continued + } // /// 07: continued } // Implicit break targets are not captured by closures. noncaptureBreak() { - while(true) (() { break; })(); // //# 08: compile-time error + while(true) (() { break; })(); // /// 08: compile-time error } // Implicit continue targets are not captured by closures. noncaptureContinue() { - while(true) (() { continue; })(); // //# 09: compile-time error + while(true) (() { continue; })(); // /// 09: compile-time error } main() { diff --git a/tests/compiler/dart2js_extra/minus_zero_test.dart b/tests/compiler/dart2js_extra/minus_zero_test.dart index 987d7a27313..d4b36f9d1d6 100644 --- a/tests/compiler/dart2js_extra/minus_zero_test.dart +++ b/tests/compiler/dart2js_extra/minus_zero_test.dart @@ -6,13 +6,13 @@ import "package:expect/expect.dart"; -const double MINUS_ZERO = -0; //# 01: static type warning, checked mode compile-time error +const double MINUS_ZERO = -0; /// 01: static type warning, checked mode compile-time error void main() { // Dart2js must not infer that the type-intersection of int and -0.0 is empty. // It must get an interceptor for the addition (`i += 3`), or use the native // JS + operation. - int i = MINUS_ZERO; // //# 01: continued - i += 3; // //# 01: continued - Expect.equals(3, i); // //# 01: continued + int i = MINUS_ZERO; // /// 01: continued + i += 3; // /// 01: continued + Expect.equals(3, i); // /// 01: continued } diff --git a/tests/compiler/dart2js_extra/mirror_printer_test.dart b/tests/compiler/dart2js_extra/mirror_printer_test.dart index 9f5d5b7d3c0..8d6c129b739 100644 --- a/tests/compiler/dart2js_extra/mirror_printer_test.dart +++ b/tests/compiler/dart2js_extra/mirror_printer_test.dart @@ -20,7 +20,7 @@ import 'dart:mirrors'; import 'crash_library_metadata.dart'; // This would crash dart2js. // Importing dart:html to make things interesting. -import 'dart:html'; //# 01: ok +import 'dart:html'; /// 01: ok class MirrorPrinter { final StringBuffer buffer; @@ -185,5 +185,5 @@ main() { print(MirrorPrinter.stringify(currentMirrorSystem().libraries)); // Clear the nodes to avoid confusing the fine test framework (by "fine" I // mean something else) -- ahe. - document.body.nodes.clear(); //# 01: continued + document.body.nodes.clear(); /// 01: continued } diff --git a/tests/compiler/dart2js_extra/mirrors_used_warning_test.dart b/tests/compiler/dart2js_extra/mirrors_used_warning_test.dart index 51f370841c3..f1eac1ec7c5 100644 --- a/tests/compiler/dart2js_extra/mirrors_used_warning_test.dart +++ b/tests/compiler/dart2js_extra/mirrors_used_warning_test.dart @@ -24,12 +24,12 @@ runTests() { Expect.equals("foo", new A().foo); Expect.isTrue(lines.isEmpty); var barResult = new A().bar; - Expect.equals("bar", barResult); // //# minif: ok + Expect.equals("bar", barResult); // /// minif: ok Expect.isTrue(lines.length == 1); var line = lines.first; Expect.isTrue(line.contains("Warning") && - line.contains("bar") && // //# minif: continued + line.contains("bar") && // /// minif: continued line.contains("minif")); } diff --git a/tests/compiler/dart2js_extra/private_symbol_literal_test.dart b/tests/compiler/dart2js_extra/private_symbol_literal_test.dart index 1f12b060934..31a278310e2 100644 --- a/tests/compiler/dart2js_extra/private_symbol_literal_test.dart +++ b/tests/compiler/dart2js_extra/private_symbol_literal_test.dart @@ -9,14 +9,14 @@ library symbol_literal_test; main() { print(#a); - print(#_a); //# 01: compile-time error + print(#_a); /// 01: compile-time error print(#a.b); - print(#_a.b); //# 02: compile-time error - print(#a._b); //# 03: compile-time error + print(#_a.b); /// 02: compile-time error + print(#a._b); /// 03: compile-time error print(#a.b.c); - print(#_a.b.c); //# 04: compile-time error - print(#a._b.c); //# 05: compile-time error - print(#a.b._c); //# 06: compile-time error + print(#_a.b.c); /// 04: compile-time error + print(#a._b.c); /// 05: compile-time error + print(#a.b._c); /// 06: compile-time error } diff --git a/tests/compiler/dart2js_extra/regress/4562_test.dart b/tests/compiler/dart2js_extra/regress/4562_test.dart index 61ba859aebc..13a30edc8c3 100644 --- a/tests/compiler/dart2js_extra/regress/4562_test.dart +++ b/tests/compiler/dart2js_extra/regress/4562_test.dart @@ -4,7 +4,7 @@ void main() { var foo = new Foo(); - var bar = new Bar(); //# 01: compile-time error + var bar = new Bar(); /// 01: compile-time error } class Foo { @@ -12,5 +12,5 @@ class Foo { } class Bar extends Foo { - Bar(); //# 01: continued + Bar(); /// 01: continued } diff --git a/tests/compiler/dart2js_extra/switch_test.dart b/tests/compiler/dart2js_extra/switch_test.dart index 93bc2295c0d..5d251f984d5 100644 --- a/tests/compiler/dart2js_extra/switch_test.dart +++ b/tests/compiler/dart2js_extra/switch_test.dart @@ -63,9 +63,9 @@ badswitches(val) { // 01 - a label/statement without a following case/default. // 02 - a label without a following case/default or statement. switch (val) { - foo: break; // //# 01: compile-time error - case 2: // //# 02: compile-time error - foo: // //# 02: continued + foo: break; // /// 01: compile-time error + case 2: // /// 02: compile-time error + foo: // /// 02: continued } } diff --git a/tests/compiler/dart2js_extra/throw1_test.dart b/tests/compiler/dart2js_extra/throw1_test.dart index b91485c1ff8..640b672c269 100644 --- a/tests/compiler/dart2js_extra/throw1_test.dart +++ b/tests/compiler/dart2js_extra/throw1_test.dart @@ -3,5 +3,5 @@ // BSD-style license that can be found in the LICENSE file. void main() { - throw "foo"; // //# 01: runtime error + throw "foo"; // /// 01: runtime error } diff --git a/tests/compiler/dart2js_extra/throw2_test.dart b/tests/compiler/dart2js_extra/throw2_test.dart index 350ec727603..90d1d5f82d5 100644 --- a/tests/compiler/dart2js_extra/throw2_test.dart +++ b/tests/compiler/dart2js_extra/throw2_test.dart @@ -31,9 +31,9 @@ void nonThrow5() { } void main() { - throw1(); // //# 01: runtime error - throw2(); // //# 02: runtime error - throw3(); // //# 03: runtime error - throw4(); // //# 04: runtime error + throw1(); // /// 01: runtime error + throw2(); // /// 02: runtime error + throw3(); // /// 03: runtime error + throw4(); // /// 04: runtime error nonThrow5(); } diff --git a/tests/compiler/dart2js_extra/type_constant_switch_test.dart b/tests/compiler/dart2js_extra/type_constant_switch_test.dart index 875c9d8b8b1..b97bb2c9285 100644 --- a/tests/compiler/dart2js_extra/type_constant_switch_test.dart +++ b/tests/compiler/dart2js_extra/type_constant_switch_test.dart @@ -11,6 +11,6 @@ var v; main() { switch (v) { - case C: break; // //# 01: compile-time error + case C: break; // /// 01: compile-time error } } diff --git a/tests/compiler/dart2js_extra/variable_type_test.dart b/tests/compiler/dart2js_extra/variable_type_test.dart index 500a70b5577..067835f2787 100644 --- a/tests/compiler/dart2js_extra/variable_type_test.dart +++ b/tests/compiler/dart2js_extra/variable_type_test.dart @@ -3,11 +3,11 @@ // BSD-style license that can be found in the LICENSE file. int foo(int i) { - i = 'fisk'; // //# 01: static type warning - return 'kat'; // //# 02: static type warning, dynamic type error + i = 'fisk'; // /// 01: static type warning + return 'kat'; // /// 02: static type warning, dynamic type error } main() { foo(42); - foo('hest'); // //# 03: static type warning + foo('hest'); // /// 03: static type warning } diff --git a/tests/corelib/big_integer_arith_vm_test.dart b/tests/corelib/big_integer_arith_vm_test.dart index 60c339a9e03..a992b9440d5 100644 --- a/tests/corelib/big_integer_arith_vm_test.dart +++ b/tests/corelib/big_integer_arith_vm_test.dart @@ -422,18 +422,18 @@ main() { for (int i = 0; i < 10; i++) { Expect.equals(1234567890123456789, foo()); Expect.equals(12345678901234567890, bar()); - testSmiOverflow(); // //# overflow: ok - testBigintAdd(); // //# add: ok - testBigintSub(); // //# sub: ok - testBigintMul(); // //# mul: ok - testBigintTruncDiv(); // //# trunDiv: ok - testBigintDiv(); // //# div: ok - testBigintModulo(); // //# mod: ok - testBigintModPow(); // //# modPow: ok - testBigintModInverse(); // //# modInv: ok - testBigintGcd(); // //# gcd: ok - testBigintNegate(); // //# negate: ok - testShiftAmount(); // //# shift: ok + testSmiOverflow(); // /// overflow: ok + testBigintAdd(); // /// add: ok + testBigintSub(); // /// sub: ok + testBigintMul(); // /// mul: ok + testBigintTruncDiv(); // /// trunDiv: ok + testBigintDiv(); // /// div: ok + testBigintModulo(); // /// mod: ok + testBigintModPow(); // /// modPow: ok + testBigintModInverse(); // /// modInv: ok + testBigintGcd(); // /// gcd: ok + testBigintNegate(); // /// negate: ok + testShiftAmount(); // /// shift: ok Expect.equals(12345678901234567890, (12345678901234567890).abs()); Expect.equals(12345678901234567890, (-12345678901234567890).abs()); var a = 10000000000000000000; diff --git a/tests/corelib/bool_from_environment2_test.dart b/tests/corelib/bool_from_environment2_test.dart index 0329c544611..0e6d410687e 100644 --- a/tests/corelib/bool_from_environment2_test.dart +++ b/tests/corelib/bool_from_environment2_test.dart @@ -3,9 +3,9 @@ // BSD-style license that can be found in the LICENSE file. main() { - const bool.fromEnvironment('NOT_FOUND', defaultValue: ''); // //# 01: compile-time error - const bool.fromEnvironment('NOT_FOUND', defaultValue: 1); // //# 02: compile-time error - const bool.fromEnvironment(null); // //# 03: compile-time error - const bool.fromEnvironment(1); // //# 04: compile-time error - const bool.fromEnvironment([]); // //# 05: compile-time error + const bool.fromEnvironment('NOT_FOUND', defaultValue: ''); // /// 01: compile-time error + const bool.fromEnvironment('NOT_FOUND', defaultValue: 1); // /// 02: compile-time error + const bool.fromEnvironment(null); // /// 03: compile-time error + const bool.fromEnvironment(1); // /// 04: compile-time error + const bool.fromEnvironment([]); // /// 05: compile-time error } diff --git a/tests/corelib/double_parse_test.dart b/tests/corelib/double_parse_test.dart index 135bd5380d3..4302dbd5aae 100644 --- a/tests/corelib/double_parse_test.dart +++ b/tests/corelib/double_parse_test.dart @@ -14,7 +14,7 @@ const whiteSpace = const [ "\x0b", "\x0c", "\x0d", - "\x85", // //# 01: ok + "\x85", // /// 01: ok "\xa0", "\u1680", "\u2000", @@ -233,26 +233,26 @@ void main() { "4555072551893136908362547791869486679949683240497058210285131854" "51396213837722826145437693412532098591327667236328125", 0.0); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000024703282292062327208828439643411068627545332140664243314532" //# 03: ok - "8041234170109088178685677591650492652607243027730579814636067699" //# 03: ok - "1112238669661707327453443265068702897439863329200619332642599205" //# 03: ok - "1806252781222000513169502627641523911022607448403553068808609405" //# 03: ok - "1727798181294290864842608522062097649849550765341204993205100587" //# 03: ok - "2127469658709242016690593998242808606978027857019419997429604579" //# 03: ok - "7572623273334010723772922131119806567715298322567005234345331218" //# 03: ok - "5169920860031716486480793611343761679481328431956040281530986197" //# 03: ok - "8304604971452253283193290744072288902141724247846767401941767720" //# 03: ok - "8561650585989659548591956327689896895290365125294085321852619688" //# 03: ok - "9863888974446146846024033780172178553364579041996676675092137151" //# 03: ok - "9705456298034409473812692774776868254618683783877327369245051207" //# 03: ok - "5931578479504396230612962142122846982018227555473696607567828620" //# 03: ok - "5497859173707553281928994692862033843994140625", // //# 03: ok - 5e-324); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000024703282292062327208828439643411068627545332140664243314532" /// 03: ok + "8041234170109088178685677591650492652607243027730579814636067699" /// 03: ok + "1112238669661707327453443265068702897439863329200619332642599205" /// 03: ok + "1806252781222000513169502627641523911022607448403553068808609405" /// 03: ok + "1727798181294290864842608522062097649849550765341204993205100587" /// 03: ok + "2127469658709242016690593998242808606978027857019419997429604579" /// 03: ok + "7572623273334010723772922131119806567715298322567005234345331218" /// 03: ok + "5169920860031716486480793611343761679481328431956040281530986197" /// 03: ok + "8304604971452253283193290744072288902141724247846767401941767720" /// 03: ok + "8561650585989659548591956327689896895290365125294085321852619688" /// 03: ok + "9863888974446146846024033780172178553364579041996676675092137151" /// 03: ok + "9705456298034409473812692774776868254618683783877327369245051207" /// 03: ok + "5931578479504396230612962142122846982018227555473696607567828620" /// 03: ok + "5497859173707553281928994692862033843994140625", // /// 03: ok + 5e-324); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -369,44 +369,44 @@ void main() { "8136843040991207538774075715754306035963544889052606784864342758" "900428165258489343614201061427593231201171875", 5e-324); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000074109846876186981626485318930233205854758970392148714663837" //# 02: ok - "8523751013260905313127797949754542453988569694847043168576596389" //# 02: ok - "9850655339096945981621940161728171894510697854671067917687257517" //# 02: ok - "7347315553307795408549809608457500958111373034747658096871009590" //# 02: ok - "9754422710047573078097111189357848386756539987835030152280559340" //# 02: ok - "4659373979179073872386829939581848166016912201945649993128979841" //# 02: ok - "1362062484498678713572180352209017023903285791732520220528974020" //# 02: ok - "8029068540216066123755499834026713000358124864790413857434018755" //# 02: ok - "2090159017259254714629617513415977493871857473787096164563890871" //# 02: ok - "8119841271673056017045493004705269590165763776884908267986972573" //# 02: ok - "3665217655679410725087643375608460039849049721491174630855395563" //# 02: ok - "54188641513168478436313080237596295773983001708984375", // //# 02: ok - 1e-323); // //# 02: ok - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000074109846876186981626485318930233205873343654412044724850344" //# 03: ok - "8923718677971811461747287833219166123210675953743507352131000861" //# 03: ok - "5508029119022396648780866584046796426383292609958261304514284249" //# 03: ok - "6061610746879932829188941791435548141415672575056325503240888674" //# 03: ok - "0040403932604439422384254107243478095284614859960753370503720954" //# 03: ok - "5808063977144841990843464643012899935961693114687389992568869106" //# 03: ok - "5599267374834247685403237712975952143398358575711517208866987110" //# 03: ok - "6349531233468788347546753834029761025748698485508885182206645314" //# 03: ok - "0639262948657591471263120659283236968907400986955900192071499065" //# 03: ok - "6496581595870337769532410323614883653969318176216473399700896902" //# 03: ok - "4282850500785430600410615352213843786678841324490411560469406158" //# 03: ok - "4550533979841101562169154890806946368370134291387467238490102415" //# 03: ok - "1863156959008792461225924284245693964036455110947393215135657241" //# 03: ok - "099571834741510656385798938572406768798828125", // //# 03: ok - 1e-323); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000074109846876186981626485318930233205854758970392148714663837" /// 02: ok + "8523751013260905313127797949754542453988569694847043168576596389" /// 02: ok + "9850655339096945981621940161728171894510697854671067917687257517" /// 02: ok + "7347315553307795408549809608457500958111373034747658096871009590" /// 02: ok + "9754422710047573078097111189357848386756539987835030152280559340" /// 02: ok + "4659373979179073872386829939581848166016912201945649993128979841" /// 02: ok + "1362062484498678713572180352209017023903285791732520220528974020" /// 02: ok + "8029068540216066123755499834026713000358124864790413857434018755" /// 02: ok + "2090159017259254714629617513415977493871857473787096164563890871" /// 02: ok + "8119841271673056017045493004705269590165763776884908267986972573" /// 02: ok + "3665217655679410725087643375608460039849049721491174630855395563" /// 02: ok + "54188641513168478436313080237596295773983001708984375", // /// 02: ok + 1e-323); // /// 02: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000074109846876186981626485318930233205873343654412044724850344" /// 03: ok + "8923718677971811461747287833219166123210675953743507352131000861" /// 03: ok + "5508029119022396648780866584046796426383292609958261304514284249" /// 03: ok + "6061610746879932829188941791435548141415672575056325503240888674" /// 03: ok + "0040403932604439422384254107243478095284614859960753370503720954" /// 03: ok + "5808063977144841990843464643012899935961693114687389992568869106" /// 03: ok + "5599267374834247685403237712975952143398358575711517208866987110" /// 03: ok + "6349531233468788347546753834029761025748698485508885182206645314" /// 03: ok + "0639262948657591471263120659283236968907400986955900192071499065" /// 03: ok + "6496581595870337769532410323614883653969318176216473399700896902" /// 03: ok + "4282850500785430600410615352213843786678841324490411560469406158" /// 03: ok + "4550533979841101562169154890806946368370134291387467238490102415" /// 03: ok + "1863156959008792461225924284245693964036455110947393215135657241" /// 03: ok + "099571834741510656385798938572406768798828125", // /// 03: ok + 1e-323); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -483,26 +483,26 @@ void main() { "0239620254961370692713747131027132020441991845959370908649389667" "01396213837722826145437693412532098591327667236328125", 1.1125369292536007e-308); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000011125369292" //# 03: ok - "5360093857793927928947412039400442434185228365340521456608629527" //# 03: ok - "0200315929606120759250932815416474352736201659755028987189999989" //# 03: ok - "3220987486513026766686796443888026815774211444057134206415720396" //# 03: ok - "3510525564718487986029401249963455450110781777556316353975973978" //# 03: ok - "4825173851725161436876623857879887229903814003929524302244972629" //# 03: ok - "6795040225381805100879491255387164751912585073962051947893527710" //# 03: ok - "5170790163081944841764003984818943810636714040207972316616704045" //# 03: ok - "0220895038833513659790739432367709097880422198053807344762226099" //# 03: ok - "3129277744388529754345873069706690065083079768940685222309466301" //# 03: ok - "4235389404255004774284573740536646273496781023858510820692328908" //# 03: ok - "0857253100067390568036719107632515767271783448958607838263400261" //# 03: ok - "9271291212296536333081616208300526650104600844121842238490102415" //# 03: ok - "1863156959008792461225924284245693964036455110947393215135657241" //# 03: ok - "099571834741510656385798938572406768798828125", // //# 03: ok - 1.112536929253601e-308); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000011125369292" /// 03: ok + "5360093857793927928947412039400442434185228365340521456608629527" /// 03: ok + "0200315929606120759250932815416474352736201659755028987189999989" /// 03: ok + "3220987486513026766686796443888026815774211444057134206415720396" /// 03: ok + "3510525564718487986029401249963455450110781777556316353975973978" /// 03: ok + "4825173851725161436876623857879887229903814003929524302244972629" /// 03: ok + "6795040225381805100879491255387164751912585073962051947893527710" /// 03: ok + "5170790163081944841764003984818943810636714040207972316616704045" /// 03: ok + "0220895038833513659790739432367709097880422198053807344762226099" /// 03: ok + "3129277744388529754345873069706690065083079768940685222309466301" /// 03: ok + "4235389404255004774284573740536646273496781023858510820692328908" /// 03: ok + "0857253100067390568036719107632515767271783448958607838263400261" /// 03: ok + "9271291212296536333081616208300526650104600844121842238490102415" /// 03: ok + "1863156959008792461225924284245693964036455110947393215135657241" /// 03: ok + "099571834741510656385798938572406768798828125", // /// 03: ok + 1.112536929253601e-308); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -561,44 +561,44 @@ void main() { "8136843040991207538774075715754306035963544889052606784864342758" "900428165258489343614201061427593231201171875", 1.112536929253601e-308); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000011125369292" //# 02: ok - "5360143264358512053601829696279729256322446286636762993074885578" //# 02: ok - "5482848940402484819383308231788212319506475197423260249353326444" //# 02: ok - "4130717265985540087275830129388183546908748591883986098046865342" //# 02: ok - "9694440740018214171090142139290408905547397593746087678853434622" //# 02: ok - "7708807769200010477987555066232823112546765790360487852208850575" //# 02: ok - "8752599546868752897347409845010678425979078962517411943872958339" //# 02: ok - "1841626929078828345647733525524686707077165117383988808631340302" //# 02: ok - "3919811372391502185169818655049136406061931820528945258278945377" //# 02: ok - "2640279824496362807465448266116748919295441238296611971177785355" //# 02: ok - "4605209927839760366494651758097211936470402475783551200969719627" //# 02: ok - "9349765358747644509438842714766105380341358326953487329219653376" //# 02: ok - "04188641513168478436313080237596295773983001708984375", // //# 02: ok - 1.1125369292536017e-308); // //# 02: ok - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000011125369292" //# 03: ok - "5360143264358512053601829696279729256322464871320782889085072085" //# 03: ok - "5882816605113390968002798115252835988728581456319724432907730915" //# 03: ok - "9788091045910990754434756551706808078781343347171179484873892074" //# 03: ok - "8408735933590351591729274322268456088851697134054755085223313705" //# 03: ok - "7994788991756876822274697984118452821074840662486211070432012189" //# 03: ok - "9901289544834521015804044548441730195923859875259151943312847604" //# 03: ok - "6078831819414397317478790886291621826572237901362985796969353392" //# 03: ok - "2240274065644224408961072655052184431452505441247416583051571936" //# 03: ok - "1189383755894699564098951411984008394330984751465415998685393549" //# 03: ok - "2981950252037042118981569077006826000273956875115116332683643956" //# 03: ok - "9967398203853664384761814691371489127171149929952724258833663970" //# 03: ok - "9550533979841101562169154890806946368370134291387467238490102415" //# 03: ok - "1863156959008792461225924284245693964036455110947393215135657241" //# 03: ok - "099571834741510656385798938572406768798828125", // //# 03: ok - 1.1125369292536017e-308); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000011125369292" /// 02: ok + "5360143264358512053601829696279729256322446286636762993074885578" /// 02: ok + "5482848940402484819383308231788212319506475197423260249353326444" /// 02: ok + "4130717265985540087275830129388183546908748591883986098046865342" /// 02: ok + "9694440740018214171090142139290408905547397593746087678853434622" /// 02: ok + "7708807769200010477987555066232823112546765790360487852208850575" /// 02: ok + "8752599546868752897347409845010678425979078962517411943872958339" /// 02: ok + "1841626929078828345647733525524686707077165117383988808631340302" /// 02: ok + "3919811372391502185169818655049136406061931820528945258278945377" /// 02: ok + "2640279824496362807465448266116748919295441238296611971177785355" /// 02: ok + "4605209927839760366494651758097211936470402475783551200969719627" /// 02: ok + "9349765358747644509438842714766105380341358326953487329219653376" /// 02: ok + "04188641513168478436313080237596295773983001708984375", // /// 02: ok + 1.1125369292536017e-308); // /// 02: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000011125369292" /// 03: ok + "5360143264358512053601829696279729256322464871320782889085072085" /// 03: ok + "5882816605113390968002798115252835988728581456319724432907730915" /// 03: ok + "9788091045910990754434756551706808078781343347171179484873892074" /// 03: ok + "8408735933590351591729274322268456088851697134054755085223313705" /// 03: ok + "7994788991756876822274697984118452821074840662486211070432012189" /// 03: ok + "9901289544834521015804044548441730195923859875259151943312847604" /// 03: ok + "6078831819414397317478790886291621826572237901362985796969353392" /// 03: ok + "2240274065644224408961072655052184431452505441247416583051571936" /// 03: ok + "1189383755894699564098951411984008394330984751465415998685393549" /// 03: ok + "2981950252037042118981569077006826000273956875115116332683643956" /// 03: ok + "9967398203853664384761814691371489127171149929952724258833663970" /// 03: ok + "9550533979841101562169154890806946368370134291387467238490102415" /// 03: ok + "1863156959008792461225924284245693964036455110947393215135657241" /// 03: ok + "099571834741510656385798938572406768798828125", // /// 03: ok + 1.1125369292536017e-308); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -674,26 +674,26 @@ void main() { "5924167958029604477064946470184777360934300451421683607013647479" "51396213837722826145437693412532098591327667236328125", 2.2250738585072014e-308); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000022250738585" //# 03: ok - "0720163012305563795567615250361241457301819893006892300968851267" //# 03: ok - "7159413856747700265506443097450144218254107162331246067966730043" //# 03: ok - "7501049413401620872340686411548038468172262181270052386775328221" //# 03: ok - "5857650751428906748569733780796363397546806336554745935958399010" //# 03: ok - "2779558910877598836767067734754861955694039806454982002173263865" //# 03: ok - "0888265793071484125840071160815995011874751834533813898637506208" //# 03: ok - "5650354607662094473839557158134613493810593365859440904719070326" //# 03: ok - "6111637871008949721205058253390132503584229153792338745607152721" //# 03: ok - "3679398551625637847181703822407461490506663533450201028923360785" //# 03: ok - "0720758060421709123733732493928588619801419722757153753675075962" //# 03: ok - "6541800803135624352387918446790161107764092054420920536627658074" //# 03: ok - "4271291212296536333081616208300526650104600844121842238490102415" //# 03: ok - "1863156959008792461225924284245693964036455110947393215135657241" //# 03: ok - "099571834741510656385798938572406768798828125", // //# 03: ok - 2.225073858507202e-308); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000022250738585" /// 03: ok + "0720163012305563795567615250361241457301819893006892300968851267" /// 03: ok + "7159413856747700265506443097450144218254107162331246067966730043" /// 03: ok + "7501049413401620872340686411548038468172262181270052386775328221" /// 03: ok + "5857650751428906748569733780796363397546806336554745935958399010" /// 03: ok + "2779558910877598836767067734754861955694039806454982002173263865" /// 03: ok + "0888265793071484125840071160815995011874751834533813898637506208" /// 03: ok + "5650354607662094473839557158134613493810593365859440904719070326" /// 03: ok + "6111637871008949721205058253390132503584229153792338745607152721" /// 03: ok + "3679398551625637847181703822407461490506663533450201028923360785" /// 03: ok + "0720758060421709123733732493928588619801419722757153753675075962" /// 03: ok + "6541800803135624352387918446790161107764092054420920536627658074" /// 03: ok + "4271291212296536333081616208300526650104600844121842238490102415" /// 03: ok + "1863156959008792461225924284245693964036455110947393215135657241" /// 03: ok + "099571834741510656385798938572406768798828125", // /// 03: ok + 2.225073858507202e-308); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -752,44 +752,44 @@ void main() { "8136843040991207538774075715754306035963544889052606784864342758" "900428165258489343614201061427593231201171875", 2.225073858507202e-308); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000022250738585" //# 03: ok - "0720212418870147920222032907240528279439037814303133837435107319" //# 03: ok - "2441946867544064325638818513821882185024380699999477330130056498" //# 03: ok - "8410779192874134192929720097048195199306799329096904278406473168" //# 03: ok - "2041565926728632933630474670123316852983422152744517260835859654" //# 03: ok - "5663192828352447877877998943107797838336991592885945552137141811" //# 03: ok - "2845825114558431922307989750439508685941245723089173894616936837" //# 03: ok - "2321191373658977977723286698840356390251044443035457396733706583" //# 03: ok - "9810554204566938246584137476071559811765738776267476659123871999" //# 03: ok - "3190400631733470900301279018817520344719025002806127777791679839" //# 03: ok - "1090578584006464715943810511489154282775041174682194133952466682" //# 03: ok - "5034313061815878293790042053923750720833666932415800027583911188" //# 03: ok - "54188641513168478436313080237596295773983001708984375", // //# 03: ok - 2.2250738585072024e-308); // //# 03: ok - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000022250738585" //# 03: ok - "0720212418870147920222032907240528279439056398987153733445293826" //# 03: ok - "2841914532254970474258308397286505854246486958895941513684460970" //# 03: ok - "4068152972799584860088646519366819731179394084384097665233499900" //# 03: ok - "0755861120300770354269606853101364036287721693053184667205738737" //# 03: ok - "5949174050909314222165141860993427546865066465011668770360303425" //# 03: ok - "3994515112524200040764624453870560455886026635830913894056826102" //# 03: ok - "6558396263994546949554344059607291509746117227014454385071719673" //# 03: ok - "8131016897819660470375391476074607837156312396985947983896498558" //# 03: ok - "1739504563131807656934782164684779819754568515974931805299288032" //# 03: ok - "9467318908203746468430727830398768346578595574013759265666391011" //# 03: ok - "5651945906921898169113014030529134467663458535415036957197921783" //# 03: ok - "4550533979841101562169154890806946368370134291387467238490102415" //# 03: ok - "1863156959008792461225924284245693964036455110947393215135657241" //# 03: ok - "099571834741510656385798938572406768798828125", // //# 03: ok - 2.2250738585072024e-308); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000022250738585" /// 03: ok + "0720212418870147920222032907240528279439037814303133837435107319" /// 03: ok + "2441946867544064325638818513821882185024380699999477330130056498" /// 03: ok + "8410779192874134192929720097048195199306799329096904278406473168" /// 03: ok + "2041565926728632933630474670123316852983422152744517260835859654" /// 03: ok + "5663192828352447877877998943107797838336991592885945552137141811" /// 03: ok + "2845825114558431922307989750439508685941245723089173894616936837" /// 03: ok + "2321191373658977977723286698840356390251044443035457396733706583" /// 03: ok + "9810554204566938246584137476071559811765738776267476659123871999" /// 03: ok + "3190400631733470900301279018817520344719025002806127777791679839" /// 03: ok + "1090578584006464715943810511489154282775041174682194133952466682" /// 03: ok + "5034313061815878293790042053923750720833666932415800027583911188" /// 03: ok + "54188641513168478436313080237596295773983001708984375", // /// 03: ok + 2.2250738585072024e-308); // /// 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000022250738585" /// 03: ok + "0720212418870147920222032907240528279439056398987153733445293826" /// 03: ok + "2841914532254970474258308397286505854246486958895941513684460970" /// 03: ok + "4068152972799584860088646519366819731179394084384097665233499900" /// 03: ok + "0755861120300770354269606853101364036287721693053184667205738737" /// 03: ok + "5949174050909314222165141860993427546865066465011668770360303425" /// 03: ok + "3994515112524200040764624453870560455886026635830913894056826102" /// 03: ok + "6558396263994546949554344059607291509746117227014454385071719673" /// 03: ok + "8131016897819660470375391476074607837156312396985947983896498558" /// 03: ok + "1739504563131807656934782164684779819754568515974931805299288032" /// 03: ok + "9467318908203746468430727830398768346578595574013759265666391011" /// 03: ok + "5651945906921898169113014030529134467663458535415036957197921783" /// 03: ok + "4550533979841101562169154890806946368370134291387467238490102415" /// 03: ok + "1863156959008792461225924284245693964036455110947393215135657241" /// 03: ok + "099571834741510656385798938572406768798828125", // /// 03: ok + 2.2250738585072024e-308); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -863,25 +863,25 @@ void main() { "8909645359318233784351199339157645340492308605462312698364257812" "5", 1.0020841800044864e-292); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000100208418000448650025174695" //# 03: ok - "1035150178458809017822159251011531515138151971877843746285762442" //# 03: ok - "8545112214057342269294258292239779301929355259416640067909319649" //# 03: ok - "7365336576866690449490575153391617964764463657240626936945707789" //# 03: ok - "0322677840073401894046998179185686691822730198820493814317137229" //# 03: ok - "5822164306994752582767555905533610628109411569344063803273395309" //# 03: ok - "4016739578124191615155910675820643598048478728683293279406596985" //# 03: ok - "3795142966229399885915374796852136102192598807080147602085351627" //# 03: ok - "7462738186176388661491270541112149644974737467220377156516124492" //# 03: ok - "5297987696655648150350049348782647584189423429523649017245633309" //# 03: ok - "0650703736050481424426844685046761507858235356421727632283550512" //# 03: ok - "9294184882356332903145058239310065886479547694117011957754993659" //# 03: ok - "5152049332041520812604025151794328168042160636342216519487980314" //# 03: ok - "421878240614097350935640662328296457417309284210205078125", // //# 03: ok - 1.0020841800044866e-292); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000100208418000448650025174695" /// 03: ok + "1035150178458809017822159251011531515138151971877843746285762442" /// 03: ok + "8545112214057342269294258292239779301929355259416640067909319649" /// 03: ok + "7365336576866690449490575153391617964764463657240626936945707789" /// 03: ok + "0322677840073401894046998179185686691822730198820493814317137229" /// 03: ok + "5822164306994752582767555905533610628109411569344063803273395309" /// 03: ok + "4016739578124191615155910675820643598048478728683293279406596985" /// 03: ok + "3795142966229399885915374796852136102192598807080147602085351627" /// 03: ok + "7462738186176388661491270541112149644974737467220377156516124492" /// 03: ok + "5297987696655648150350049348782647584189423429523649017245633309" /// 03: ok + "0650703736050481424426844685046761507858235356421727632283550512" /// 03: ok + "9294184882356332903145058239310065886479547694117011957754993659" /// 03: ok + "5152049332041520812604025151794328168042160636342216519487980314" /// 03: ok + "421878240614097350935640662328296457417309284210205078125", // /// 03: ok + 1.0020841800044866e-292); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -937,43 +937,43 @@ void main() { "4847950667958479187395974848205671831957839363657783480512019685" "578121759385902649064359337671703542582690715789794921875", 2.0041683600089726e-292); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000200416836000897266674241512" //# 03: ok - "5990092893382710435783708701744713907322363070003179054747514262" //# 03: ok - "7385611700512865061525449421701203817286652851291627374287240329" //# 03: ok - "3753705169156289950978164746871212513772283206234057202629821353" //# 03: ok - "8809538439162226010550634208659737749820025430842192660178060615" //# 03: ok - "3474267718174236120090795958487048484027109406716660005865875254" //# 03: ok - "7540730218997620056025234843183240653494745917236268600971966054" //# 03: ok - "2572750817920844689872038240532666937066187074066929436725783508" //# 03: ok - "0513647350599865639683590212819431367049178252060735656411044144" //# 03: ok - "5314088186163138416702979387974756763836546863081940712096908853" //# 03: ok - "9929165937080868658779320353585122361868059050079309936626251244" //# 03: ok - "0765647609431766215648800660842354659507691394537687301635742187" //# 03: ok - "5", // //# 03: ok - 2.004168360008973e-292); // //# 03: ok - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000200416836000897266674241512" //# 03: ok - "5990092893382710435783708785442689934124446215379877007119186963" //# 03: ok - "1799271173601405540673717580039876412295823431198128133887844732" //# 03: ok - "7822096271111944266498822575337206743053529154538278267721206728" //# 03: ok - "1206759279588886755511816487266193645578706075743945771432529989" //# 03: ok - "5627720577353214542977288069464672781437627568914207256313896083" //# 03: ok - "6647266336088483105727658239269018534852601546443784653776612265" //# 03: ok - "4362171708319597782738064157144965045964873355636409438294693959" //# 03: ok - "3883447613213167389211587415988230219943616159642947883454256631" //# 03: ok - "7129850578881555219447792913718868827972321214300345663373246010" //# 03: ok - "5887233720340859229642766731751409169335306833113418201122555553" //# 03: ok - "1150187132469865334442659560994775205494930483192386561026478034" //# 03: ok - "5152049332041520812604025151794328168042160636342216519487980314" //# 03: ok - "421878240614097350935640662328296457417309284210205078125", // //# 03: ok - 2.004168360008973e-292); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000200416836000897266674241512" /// 03: ok + "5990092893382710435783708701744713907322363070003179054747514262" /// 03: ok + "7385611700512865061525449421701203817286652851291627374287240329" /// 03: ok + "3753705169156289950978164746871212513772283206234057202629821353" /// 03: ok + "8809538439162226010550634208659737749820025430842192660178060615" /// 03: ok + "3474267718174236120090795958487048484027109406716660005865875254" /// 03: ok + "7540730218997620056025234843183240653494745917236268600971966054" /// 03: ok + "2572750817920844689872038240532666937066187074066929436725783508" /// 03: ok + "0513647350599865639683590212819431367049178252060735656411044144" /// 03: ok + "5314088186163138416702979387974756763836546863081940712096908853" /// 03: ok + "9929165937080868658779320353585122361868059050079309936626251244" /// 03: ok + "0765647609431766215648800660842354659507691394537687301635742187" /// 03: ok + "5", // /// 03: ok + 2.004168360008973e-292); // /// 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000200416836000897266674241512" /// 03: ok + "5990092893382710435783708785442689934124446215379877007119186963" /// 03: ok + "1799271173601405540673717580039876412295823431198128133887844732" /// 03: ok + "7822096271111944266498822575337206743053529154538278267721206728" /// 03: ok + "1206759279588886755511816487266193645578706075743945771432529989" /// 03: ok + "5627720577353214542977288069464672781437627568914207256313896083" /// 03: ok + "6647266336088483105727658239269018534852601546443784653776612265" /// 03: ok + "4362171708319597782738064157144965045964873355636409438294693959" /// 03: ok + "3883447613213167389211587415988230219943616159642947883454256631" /// 03: ok + "7129850578881555219447792913718868827972321214300345663373246010" /// 03: ok + "5887233720340859229642766731751409169335306833113418201122555553" /// 03: ok + "1150187132469865334442659560994775205494930483192386561026478034" /// 03: ok + "5152049332041520812604025151794328168042160636342216519487980314" /// 03: ok + "421878240614097350935640662328296457417309284210205078125", // /// 03: ok + 2.004168360008973e-292); // /// 03: ok testParse("0.99999999999999988897769753748434595763683319091796875", 0.9999999999999999); testParse("0.99999999999999988897769753748434595763683319091796879176194859" @@ -984,12 +984,12 @@ void main() { "4809443029054117700758095643512548748358614094344726684993771234" "576088145773464788135242997668683528900146484375", 0.9999999999999999); - testParse("0.999999999999999944488848768742172978818416595458984375", //# 03: ok - 1.0); // //# 03: ok - testParse("0.99999999999999994448884876874217297881841659545898441676194859" //# 03: ok - "5190556970945882299241904356487451251641385905655273315006228765" //# 03: ok - "423911854226535211864757002331316471099853515625", // //# 03: ok - 1.0); // //# 03: ok + testParse("0.999999999999999944488848768742172978818416595458984375", /// 03: ok + 1.0); // /// 03: ok + testParse("0.99999999999999994448884876874217297881841659545898441676194859" /// 03: ok + "5190556970945882299241904356487451251641385905655273315006228765" /// 03: ok + "423911854226535211864757002331316471099853515625", // /// 03: ok + 1.0); // /// 03: ok testParse("0.499999999999999944488848768742172978818416595458984375", 0.49999999999999994); testParse("0.49999999999999994448884876874217297881841659545898439588097429" @@ -1000,12 +1000,12 @@ void main() { "2404721514527058850379047821756274374179307047172363342496885617" "2880440728867323940676214988343417644500732421875", 0.49999999999999994); - testParse("0.4999999999999999722444243843710864894092082977294921875", //# 03: ok - 0.5); // //# 03: ok - testParse("0.49999999999999997224442438437108648940920829772949220838097429" //# 03: ok - "7595278485472941149620952178243725625820692952827636657503114382" //# 03: ok - "7119559271132676059323785011656582355499267578125", // //# 03: ok - 0.5); // //# 03: ok + testParse("0.4999999999999999722444243843710864894092082977294921875", /// 03: ok + 0.5); // /// 03: ok + testParse("0.49999999999999997224442438437108648940920829772949220838097429" /// 03: ok + "7595278485472941149620952178243725625820692952827636657503114382" /// 03: ok + "7119559271132676059323785011656582355499267578125", // /// 03: ok + 0.5); // /// 03: ok testParse("1.9999999999999997779553950749686919152736663818359375", 1.9999999999999998); testParse("1.99999999999999977795539507496869191527366638183593758352389719" @@ -1016,12 +1016,12 @@ void main() { "9618886058108235401516191287025097496717228188689453369987542469" "15217629154692957627048599533736705780029296875", 1.9999999999999998); - testParse("1.99999999999999988897769753748434595763683319091796875", //# 03: ok - 2.0); // //# 03: ok - testParse("1.99999999999999988897769753748434595763683319091796883352389719" //# 03: ok - "0381113941891764598483808712974902503282771811310546630012457530" //# 03: ok - "84782370845307042372951400466263294219970703125", // //# 03: ok - 2.0); // //# 03: ok + testParse("1.99999999999999988897769753748434595763683319091796875", /// 03: ok + 2.0); // /// 03: ok + testParse("1.99999999999999988897769753748434595763683319091796883352389719" /// 03: ok + "0381113941891764598483808712974902503282771811310546630012457530" /// 03: ok + "84782370845307042372951400466263294219970703125", // /// 03: ok + 2.0); // /// 03: ok testParse("4503599627370495.5", 4503599627370495.5); testParse("4503599627370495.50000000000000000000000000000000000018807909613" diff --git a/tests/corelib/from_environment_const_type_test.dart b/tests/corelib/from_environment_const_type_test.dart index fb9de9816a1..e68ac4f3900 100644 --- a/tests/corelib/from_environment_const_type_test.dart +++ b/tests/corelib/from_environment_const_type_test.dart @@ -8,31 +8,31 @@ import "package:expect/expect.dart"; class Foo {} const - bool // //# 01: ok - int // //# 02: static type warning, checked mode compile-time error - String // //# 03: static type warning, checked mode compile-time error - Foo // //# 04: static type warning, checked mode compile-time error + bool // /// 01: ok + int // /// 02: static type warning, checked mode compile-time error + String // /// 03: static type warning, checked mode compile-time error + Foo // /// 04: static type warning, checked mode compile-time error a = const bool.fromEnvironment('a'); const - bool // //# 05: ok - int // //# 06: static type warning, checked mode compile-time error - String // //# 07: static type warning, checked mode compile-time error - Foo // //# 08: static type warning, checked mode compile-time error + bool // /// 05: ok + int // /// 06: static type warning, checked mode compile-time error + String // /// 07: static type warning, checked mode compile-time error + Foo // /// 08: static type warning, checked mode compile-time error b = const bool.fromEnvironment('b'); const - bool // //# 09: static type warning, checked mode compile-time error - int // //# 10: ok - String // //# 11: static type warning, checked mode compile-time error - Foo // //# 12: static type warning, checked mode compile-time error + bool // /// 09: static type warning, checked mode compile-time error + int // /// 10: ok + String // /// 11: static type warning, checked mode compile-time error + Foo // /// 12: static type warning, checked mode compile-time error c = const int.fromEnvironment('c'); const - bool // //# 13: static type warning, checked mode compile-time error - int // //# 14: static type warning, checked mode compile-time error - String // //# 15: ok - Foo // //# 16: static type warning, checked mode compile-time error + bool // /// 13: static type warning, checked mode compile-time error + int // /// 14: static type warning, checked mode compile-time error + String // /// 15: ok + Foo // /// 16: static type warning, checked mode compile-time error d = const String.fromEnvironment('d'); main() { diff --git a/tests/corelib/from_environment_const_type_undefined_test.dart b/tests/corelib/from_environment_const_type_undefined_test.dart index 076fa7e144c..7cda78fad1e 100644 --- a/tests/corelib/from_environment_const_type_undefined_test.dart +++ b/tests/corelib/from_environment_const_type_undefined_test.dart @@ -7,31 +7,31 @@ import "package:expect/expect.dart"; class Foo {} const - bool // //# 01: ok - int // //# 02: static type warning, checked mode compile-time error - String //# 03: static type warning, checked mode compile-time error - Foo // //# 04: static type warning, checked mode compile-time error + bool // /// 01: ok + int // /// 02: static type warning, checked mode compile-time error + String /// 03: static type warning, checked mode compile-time error + Foo // /// 04: static type warning, checked mode compile-time error a = const bool.fromEnvironment('a'); const - bool // //# 05: ok - int // //# 06: static type warning, checked mode compile-time error - String //# 07: static type warning, checked mode compile-time error - Foo // //# 08: static type warning, checked mode compile-time error + bool // /// 05: ok + int // /// 06: static type warning, checked mode compile-time error + String /// 07: static type warning, checked mode compile-time error + Foo // /// 08: static type warning, checked mode compile-time error b = const bool.fromEnvironment('b'); const - bool // //# 09: static type warning - int // //# 10: ok - String //# 11: static type warning - Foo // //# 12: static type warning + bool // /// 09: static type warning + int // /// 10: ok + String /// 11: static type warning + Foo // /// 12: static type warning c = const int.fromEnvironment('c'); const - bool // //# 13: static type warning - int // //# 14: static type warning - String //# 15: ok - Foo // //# 16: static type warning + bool // /// 13: static type warning + int // /// 14: static type warning + String /// 15: ok + Foo // /// 16: static type warning d = const String.fromEnvironment('d'); main() { diff --git a/tests/corelib/hash_set_test.dart b/tests/corelib/hash_set_test.dart index 831bf0c8243..29b202d3cf0 100644 --- a/tests/corelib/hash_set_test.dart +++ b/tests/corelib/hash_set_test.dart @@ -285,7 +285,7 @@ void testIdentitySet(Set create()) { // All compile time constants are identical to themselves. var constants = [double.INFINITY, - double.NAN, -0.0, //# 01: ok + double.NAN, -0.0, /// 01: ok 0.0, 42, "", null, false, true, #bif, testIdentitySet]; set.addAll(constants); Expect.equals(constants.length, set.length); diff --git a/tests/corelib/hidden_library2_test.dart b/tests/corelib/hidden_library2_test.dart index 637cd940779..dd12cd28f15 100644 --- a/tests/corelib/hidden_library2_test.dart +++ b/tests/corelib/hidden_library2_test.dart @@ -9,7 +9,7 @@ main() { print(['x'].where((_) { // We actually don't really care for the successful case. We just want to // make sure that the test doesn't crash when it is negative. - throw 'fisk'; // //# 01: runtime error + throw 'fisk'; // /// 01: runtime error return true; }).toList()); } diff --git a/tests/corelib/int_from_environment3_test.dart b/tests/corelib/int_from_environment3_test.dart index 996338a2593..648b8d62481 100644 --- a/tests/corelib/int_from_environment3_test.dart +++ b/tests/corelib/int_from_environment3_test.dart @@ -3,9 +3,9 @@ // BSD-style license that can be found in the LICENSE file. main() { - const int.fromEnvironment('NOT_FOUND', defaultValue: ''); // //# 01: compile-time error - const int.fromEnvironment('NOT_FOUND', defaultValue: true); // //# 02: compile-time error - const int.fromEnvironment(null); // //# 03: compile-time error - const int.fromEnvironment(1); // //# 04: compile-time error - const int.fromEnvironment([]); // //# 05: compile-time error + const int.fromEnvironment('NOT_FOUND', defaultValue: ''); // /// 01: compile-time error + const int.fromEnvironment('NOT_FOUND', defaultValue: true); // /// 02: compile-time error + const int.fromEnvironment(null); // /// 03: compile-time error + const int.fromEnvironment(1); // /// 04: compile-time error + const int.fromEnvironment([]); // /// 05: compile-time error } diff --git a/tests/corelib/int_modulo_arith_test.dart b/tests/corelib/int_modulo_arith_test.dart index 9b696f36d37..404a21d8638 100644 --- a/tests/corelib/int_modulo_arith_test.dart +++ b/tests/corelib/int_modulo_arith_test.dart @@ -118,7 +118,7 @@ testModInverse() { test(137, smallNumber, 856087223); test(mediumNumber, 137, 77); test(137, mediumNumber, 540686667207353); - test(bigNumber, 137, 128); // //# bignum: ok + test(bigNumber, 137, 128); // /// bignum: ok // Bigger numbers as modulo is tested in big_integer_arith_vm_test.dart. // Big doubles are not co-prime, so there is nothing to test for dart2js. } @@ -203,7 +203,7 @@ testGcd() { } main() { - testModPow(); // //# modPow: ok + testModPow(); // /// modPow: ok testModInverse(); testGcd(); } diff --git a/tests/corelib/int_parse_radix_test.dart b/tests/corelib/int_parse_radix_test.dart index d99230bab9a..092e3344d10 100644 --- a/tests/corelib/int_parse_radix_test.dart +++ b/tests/corelib/int_parse_radix_test.dart @@ -9,7 +9,7 @@ void main() { bool checkedMode = false; assert((checkedMode = true)); const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20" - "\x85" // //# 01: ok + "\x85" // /// 01: ok "\xa0"; const String whiteSpace = "$oneByteWhiteSpace\u1680" "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a" @@ -61,21 +61,21 @@ void main() { } } - for (int i = 2; i <= 36; i++) { // //# 02: ok - // Test with bignums. // //# 02: continued - var digit = digits[i - 1]; // //# 02: continued - testParse(pow(i, 64) - 1, digit * 64, i); // //# 02: continued - testParse(0, zeros, i); // //# 02: continued - } // //# 02: continued + for (int i = 2; i <= 36; i++) { // /// 02: ok + // Test with bignums. // /// 02: continued + var digit = digits[i - 1]; // /// 02: continued + testParse(pow(i, 64) - 1, digit * 64, i); // /// 02: continued + testParse(0, zeros, i); // /// 02: continued + } // /// 02: continued // Allow both upper- and lower-case letters. Expect.equals(0xABCD, int.parse("ABCD", radix: 16)); Expect.equals(0xABCD, int.parse("abcd", radix: 16)); Expect.equals(15628859, int.parse("09azAZ", radix: 36)); // Big number. - Expect.equals(0x12345678123456781234567812345678, // //# 02: continued - int.parse("0x1234567812345678" // //# 02: continued - "1234567812345678")); // //# 02: continued + Expect.equals(0x12345678123456781234567812345678, // /// 02: continued + int.parse("0x1234567812345678" // /// 02: continued + "1234567812345678")); // /// 02: continued // Allow whitespace before and after the number. Expect.equals(1, int.parse(" 1", radix: 2)); Expect.equals(1, int.parse("1 ", radix: 2)); diff --git a/tests/corelib/integer_to_string_test.dart b/tests/corelib/integer_to_string_test.dart index b96f6f0543c..53c4d95305d 100644 --- a/tests/corelib/integer_to_string_test.dart +++ b/tests/corelib/integer_to_string_test.dart @@ -51,22 +51,22 @@ main() { // ~2^53. test(0x1fffffffffffff, "9007199254740991"); test(0x20000000000000, "9007199254740992"); - test(0x20000000000001, "9007199254740993"); // //# 01: ok + test(0x20000000000001, "9007199254740993"); // /// 01: ok // ~2^62. - test(0x3fffffffffffffff, "4611686018427387903"); // //# 01: continued - test(0x4000000000000000, "4611686018427387904"); // //# 01: continued - test(0x4000000000000001, "4611686018427387905"); // //# 01: continued + test(0x3fffffffffffffff, "4611686018427387903"); // /// 01: continued + test(0x4000000000000000, "4611686018427387904"); // /// 01: continued + test(0x4000000000000001, "4611686018427387905"); // /// 01: continued // ~2^63. - test(0x7fffffffffffffff, "9223372036854775807"); // //# 01: continued - test(0x8000000000000000, "9223372036854775808"); // //# 01: continued - test(0x8000000000000001, "9223372036854775809"); // //# 01: continued + test(0x7fffffffffffffff, "9223372036854775807"); // /// 01: continued + test(0x8000000000000000, "9223372036854775808"); // /// 01: continued + test(0x8000000000000001, "9223372036854775809"); // /// 01: continued // ~2^64. - test(0xffffffffffffffff, "18446744073709551615"); // //# 01: continued - test(0x10000000000000000, "18446744073709551616"); // //# 01: continued - test(0x10000000000000001, "18446744073709551617"); // //# 01: continued + test(0xffffffffffffffff, "18446744073709551615"); // /// 01: continued + test(0x10000000000000000, "18446744073709551616"); // /// 01: continued + test(0x10000000000000001, "18446744073709551617"); // /// 01: continued // Big bignum. - test(123456789012345678901234567890, // //# 01: continued - "123456789012345678901234567890"); // //# 01: continued + test(123456789012345678901234567890, // /// 01: continued + "123456789012345678901234567890"); // /// 01: continued // Decimal special cases. @@ -79,10 +79,10 @@ main() { number *= 10; } // Fails to represent exactly in dart2js. - for (int i = 15; i < 22; i++) { // //# 01: continued - test(number - 1, "9" * i); // //# 01: continued - test(number, "1" + "0" * i); // //# 01: continued - test(number + 1, "1" + "0" * (i - 1) + "1"); // //# 01: continued - number *= 10; // //# 01: continued - } // //# 01: continued + for (int i = 15; i < 22; i++) { // /// 01: continued + test(number - 1, "9" * i); // /// 01: continued + test(number, "1" + "0" * i); // /// 01: continued + test(number + 1, "1" + "0" * (i - 1) + "1"); // /// 01: continued + number *= 10; // /// 01: continued + } // /// 01: continued } diff --git a/tests/corelib/iterable_generate_test.dart b/tests/corelib/iterable_generate_test.dart index ca6ba3adeea..81e69e2c271 100644 --- a/tests/corelib/iterable_generate_test.dart +++ b/tests/corelib/iterable_generate_test.dart @@ -59,12 +59,12 @@ main() { // Invalid types: Expect.throws(() => new Iterable.generate(5)); - if (checkedMode) { // //# 01: ok - Expect.throws(() => new Iterable.generate(5).elementAt(2)); //# 01: continued - } else { // //# 01: continued - Iterable iter5 = new Iterable.generate(5); // //# 01: continued - Expect.equals(2, iter5.elementAt(2)); // //# 01: continued - } // //# 01: continued + if (checkedMode) { // /// 01: ok + Expect.throws(() => new Iterable.generate(5).elementAt(2)); /// 01: continued + } else { // /// 01: continued + Iterable iter5 = new Iterable.generate(5); // /// 01: continued + Expect.equals(2, iter5.elementAt(2)); // /// 01: continued + } // /// 01: continued Expect.throws(() => new Iterable.generate(5)); // Regression: https://github.com/dart-lang/sdk/issues/26358 diff --git a/tests/corelib/iterable_return_type_test.dart b/tests/corelib/iterable_return_type_test.dart index b492478fc21..941da36d98c 100644 --- a/tests/corelib/iterable_return_type_test.dart +++ b/tests/corelib/iterable_return_type_test.dart @@ -63,14 +63,14 @@ main() { testList(new List.generate(1, (x) => x + 1)); // Typed lists. - testList(new Uint8List(1)..[0] = 1); // //# 01: ok - testList(new Int8List(1)..[0] = 1); // //# 01: continued - testList(new Uint16List(1)..[0] = 1); // //# 01: continued - testList(new Int16List(1)..[0] = 1); // //# 01: continued - testList(new Uint32List(1)..[0] = 1); // //# 01: continued - testList(new Int32List(1)..[0] = 1); // //# 01: continued - testList(new Uint64List(1)..[0] = 1); // //# 02: ok - testList(new Int64List(1)..[0] = 1); // //# 02: continued + testList(new Uint8List(1)..[0] = 1); // /// 01: ok + testList(new Int8List(1)..[0] = 1); // /// 01: continued + testList(new Uint16List(1)..[0] = 1); // /// 01: continued + testList(new Int16List(1)..[0] = 1); // /// 01: continued + testList(new Uint32List(1)..[0] = 1); // /// 01: continued + testList(new Int32List(1)..[0] = 1); // /// 01: continued + testList(new Uint64List(1)..[0] = 1); // /// 02: ok + testList(new Int64List(1)..[0] = 1); // /// 02: continued testIterable(new Set()..add(1)); testIterable(new HashSet()..add(1)); diff --git a/tests/corelib/iterable_to_list_test.dart b/tests/corelib/iterable_to_list_test.dart index 63ec15764fd..7379c1dca91 100644 --- a/tests/corelib/iterable_to_list_test.dart +++ b/tests/corelib/iterable_to_list_test.dart @@ -28,11 +28,11 @@ main() { testIterable(new Set.from([1, 2, 3]), [1, 2, 3]); testIterable(new Queue.from([1, 2, 3]), [1, 2, 3]); testIterable(new Queue.from([1, 2, 3]), [1, 2, 3]); - testIterable(new Uint8List.fromList([1, 2, 3]), // //# 01: ok - [1, 2, 3]); // //# 01: continued - testIterable(new Float32List.fromList([1.0, 2.0, 3.0]), // //# 01: continued - [1.0, 2.0, 3.0]); // //# 01: continued - testIterable("abc".codeUnits, [97, 98, 99]); // //# 01: continued + testIterable(new Uint8List.fromList([1, 2, 3]), // /// 01: ok + [1, 2, 3]); // /// 01: continued + testIterable(new Float32List.fromList([1.0, 2.0, 3.0]), // /// 01: continued + [1.0, 2.0, 3.0]); // /// 01: continued + testIterable("abc".codeUnits, [97, 98, 99]); // /// 01: continued testIterable("abc".runes, [97, 98, 99]); } diff --git a/tests/corelib/list_test.dart b/tests/corelib/list_test.dart index 8d6df271327..75d33e98bb0 100644 --- a/tests/corelib/list_test.dart +++ b/tests/corelib/list_test.dart @@ -582,7 +582,7 @@ class MyFixedList extends ListBase { void testListConstructor() { Expect.throws(() { new List(0).add(4); }); // Is fixed-length. - Expect.throws(() { new List(-2); }); // Not negative. //# 01: ok + Expect.throws(() { new List(-2); }); // Not negative. /// 01: ok Expect.throws(() { new List(null); }); // Not null. Expect.listEquals([4], new List()..add(4)); Expect.throws(() { new List.filled(0, 42).add(4); }); // Is fixed-length. diff --git a/tests/corelib/nan_infinity_test.dart b/tests/corelib/nan_infinity_test.dart index bb8b1a7bb25..96088575bf5 100644 --- a/tests/corelib/nan_infinity_test.dart +++ b/tests/corelib/nan_infinity_test.dart @@ -48,7 +48,7 @@ void main() { Expect.equals("-Infinity", double.NEGATIVE_INFINITY.toString()); // Test identities. - Expect.isTrue(identical(double.NAN, double.NAN)); // //# 01: ok + Expect.isTrue(identical(double.NAN, double.NAN)); // /// 01: ok Expect.isTrue(identical(double.INFINITY, double.INFINITY)); Expect.isTrue(identical(double.NEGATIVE_INFINITY, double.NEGATIVE_INFINITY)); Expect.isFalse(identical(double.NAN, double.INFINITY)); diff --git a/tests/corelib/num_parse_test.dart b/tests/corelib/num_parse_test.dart index 15cbcadf578..e3c0a7034e3 100644 --- a/tests/corelib/num_parse_test.dart +++ b/tests/corelib/num_parse_test.dart @@ -157,7 +157,7 @@ void main() { testDouble(9007199254740992.0); testDouble(1.7976931348623157e+308); testDouble(double.INFINITY); - testDouble(double.NAN); // //# 01: ok + testDouble(double.NAN); // /// 01: ok // Strings that cannot occur from toString of a number. testParse("000000000000", 0); diff --git a/tests/corelib/print_test.dart b/tests/corelib/print_test.dart index 2cbe731e963..32f19488712 100644 --- a/tests/corelib/print_test.dart +++ b/tests/corelib/print_test.dart @@ -7,7 +7,7 @@ import 'package:expect/expect.dart'; class A { toString() { if (false - || true // //# 01: runtime error + || true // /// 01: runtime error ) { return 499; } else { diff --git a/tests/corelib/string_case_test.dart b/tests/corelib/string_case_test.dart index b199de732bf..fe30ad1a1b5 100644 --- a/tests/corelib/string_case_test.dart +++ b/tests/corelib/string_case_test.dart @@ -21,30 +21,30 @@ void testSpecialCases() { // Letters in Latin-1 where the upper case is not in Latin-1. // German sharp s. Upper case variant is "SS". - Expect.equals("SS", "\xdf".toUpperCase()); // //# 01: ok + Expect.equals("SS", "\xdf".toUpperCase()); // /// 01: ok Expect.equals("\xdf", "\xdf".toLowerCase()); - Expect.equals("ss", "\xdf".toUpperCase().toLowerCase()); // //# 01: continued + Expect.equals("ss", "\xdf".toUpperCase().toLowerCase()); // /// 01: continued // Micro sign (not same as lower-case Greek letter mu, U+03BC). - Expect.equals("\u039c", "\xb5".toUpperCase()); // //# 02: ok + Expect.equals("\u039c", "\xb5".toUpperCase()); // /// 02: ok Expect.equals("\xb5", "\xb5".toLowerCase()); - Expect.equals("\u03Bc", // //# 02: continued - "\xb5".toUpperCase().toLowerCase()); // //# 02: continued + Expect.equals("\u03Bc", // /// 02: continued + "\xb5".toUpperCase().toLowerCase()); // /// 02: continued // Small letter y diaresis. - Expect.equals("\u0178", "\xff".toUpperCase()); // //# 03: ok + Expect.equals("\u0178", "\xff".toUpperCase()); // /// 03: ok Expect.equals("\xff", "\xff".toLowerCase()); - Expect.equals("\xff", "\xff".toUpperCase().toLowerCase()); // //# 03: continued + Expect.equals("\xff", "\xff".toUpperCase().toLowerCase()); // /// 03: continued // Zero. Expect.equals("\x00", "\x00".toLowerCase()); Expect.equals("\x00", "\x00".toUpperCase()); // Test all combinations of ordering of lower-case, upper-case and // special-when-upper-cased characters. - Expect.equals("AA\u0178", "Aa\xff".toUpperCase()); // //# 03: continued - Expect.equals("AA\u0178", "aA\xff".toUpperCase()); // //# 03: continued - Expect.equals("A\u0178A", "A\xffa".toUpperCase()); // //# 03: continued - Expect.equals("A\u0178A", "a\xffA".toUpperCase()); // //# 03: continued - Expect.equals("\u0178AA", "\xffAa".toUpperCase()); // //# 03: continued - Expect.equals("\u0178AA", "\xffaA".toUpperCase()); // //# 03: continued + Expect.equals("AA\u0178", "Aa\xff".toUpperCase()); // /// 03: continued + Expect.equals("AA\u0178", "aA\xff".toUpperCase()); // /// 03: continued + Expect.equals("A\u0178A", "A\xffa".toUpperCase()); // /// 03: continued + Expect.equals("A\u0178A", "a\xffA".toUpperCase()); // /// 03: continued + Expect.equals("\u0178AA", "\xffAa".toUpperCase()); // /// 03: continued + Expect.equals("\u0178AA", "\xffaA".toUpperCase()); // /// 03: continued Expect.equals("aa\xff", "Aa\xff".toLowerCase()); Expect.equals("aa\xff", "aA\xff".toLowerCase()); diff --git a/tests/corelib/string_from_environment3_test.dart b/tests/corelib/string_from_environment3_test.dart index 962f5f1de05..21af283b8ef 100644 --- a/tests/corelib/string_from_environment3_test.dart +++ b/tests/corelib/string_from_environment3_test.dart @@ -3,9 +3,9 @@ // BSD-style license that can be found in the LICENSE file. main() { - const String.fromEnvironment('NOT_FOUND', defaultValue: 1); // //# 01: compile-time error - const String.fromEnvironment('NOT_FOUND', defaultValue: true); // //# 02: compile-time error - const String.fromEnvironment(null); // //# 03: compile-time error - const String.fromEnvironment(1); // //# 04: compile-time error - const String.fromEnvironment([]); // //# 05: compile-time error + const String.fromEnvironment('NOT_FOUND', defaultValue: 1); // /// 01: compile-time error + const String.fromEnvironment('NOT_FOUND', defaultValue: true); // /// 02: compile-time error + const String.fromEnvironment(null); // /// 03: compile-time error + const String.fromEnvironment(1); // /// 04: compile-time error + const String.fromEnvironment([]); // /// 05: compile-time error } diff --git a/tests/corelib/string_trimlr_test.dart b/tests/corelib/string_trimlr_test.dart index 90eb02ddd4e..fb834939692 100644 --- a/tests/corelib/string_trimlr_test.dart +++ b/tests/corelib/string_trimlr_test.dart @@ -100,12 +100,12 @@ main() { // string_trimlr_test/01 fails on these engines. // Should be fixed in tip-of-tree V8 per 2014-02-10. var s200B = new String.fromCharCode(0x200B); - Expect.identical(s200B, s200B.trimLeft()); // //# 01: ok - Expect.identical(s200B, s200B.trimRight()); // //# 01: ok + Expect.identical(s200B, s200B.trimLeft()); // /// 01: ok + Expect.identical(s200B, s200B.trimRight()); // /// 01: ok // U+180E ceased to be whitespace in Unicode version 6.3.0 // string_trimlr_test/02 fails on implementations using earlier versions. var s180E = new String.fromCharCode(0x180E); - Expect.identical(s180E, s180E.trimLeft()); // //# 02: ok - Expect.identical(s180E, s180E.trimRight()); // //# 02: ok + Expect.identical(s180E, s180E.trimLeft()); // /// 02: ok + Expect.identical(s180E, s180E.trimRight()); // /// 02: ok } diff --git a/tests/corelib/symbol_operator_test.dart b/tests/corelib/symbol_operator_test.dart index 753aec5c127..e9b9e65ec3e 100644 --- a/tests/corelib/symbol_operator_test.dart +++ b/tests/corelib/symbol_operator_test.dart @@ -28,14 +28,14 @@ main() { testSymbol(#[]=, ($[$]=$).lastMember, "[]="); testSymbol(const Symbol("unary-"), -$, "unary-"); - testSymbolThrows(">>>"); // //# 03: ok - testSymbolThrows("!"); // //# 03: continued - testSymbolThrows("&&"); // //# 03: continued - testSymbolThrows("||"); // //# 03: continued - testSymbolThrows("?"); // //# 03: continued - testSymbolThrows("?:"); // //# 03: continued - testSymbolThrows("#"); // //# 03: continued - testSymbolThrows("//"); // //# 03: continued + testSymbolThrows(">>>"); // /// 03: ok + testSymbolThrows("!"); // /// 03: continued + testSymbolThrows("&&"); // /// 03: continued + testSymbolThrows("||"); // /// 03: continued + testSymbolThrows("?"); // /// 03: continued + testSymbolThrows("?:"); // /// 03: continued + testSymbolThrows("#"); // /// 03: continued + testSymbolThrows("//"); // /// 03: continued } void testSymbol(Symbol constSymbol, var mirrorSymbol, String name) { diff --git a/tests/corelib/symbol_reserved_word_test.dart b/tests/corelib/symbol_reserved_word_test.dart index 36df8645350..cc8d8bb7b0e 100644 --- a/tests/corelib/symbol_reserved_word_test.dart +++ b/tests/corelib/symbol_reserved_word_test.dart @@ -12,113 +12,113 @@ 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 + 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 - x = #void.foo; // //# 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 + x = const Symbol('void.foo'); // /// 04: compile-time error + x = #void.foo; // /// 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 + 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 } diff --git a/tests/corelib/symbol_test.dart b/tests/corelib/symbol_test.dart index 6b97092a670..0bdb0946341 100644 --- a/tests/corelib/symbol_test.dart +++ b/tests/corelib/symbol_test.dart @@ -9,7 +9,7 @@ main() { print(x = const Symbol('fisk')); try { - print(const Symbol(0)); //# 01: compile-time error + print(const Symbol(0)); /// 01: compile-time error } on NoSuchMethodError { print('Caught NoSuchMethodError'); } on TypeError { @@ -17,13 +17,13 @@ main() { } try { - print(const Symbol('0')); //# 02: compile-time error + print(const Symbol('0')); /// 02: compile-time error } on ArgumentError catch (e) { print('Caught $e'); } try { - print(const Symbol('_')); //# 03: compile-time error + print(const Symbol('_')); /// 03: compile-time error } on ArgumentError catch (e) { print('Caught $e'); } diff --git a/tests/corelib/throw_half_surrogate_pair_test.dart b/tests/corelib/throw_half_surrogate_pair_test.dart index a3545b2e3a8..8e0f98a1ff1 100644 --- a/tests/corelib/throw_half_surrogate_pair_test.dart +++ b/tests/corelib/throw_half_surrogate_pair_test.dart @@ -7,6 +7,6 @@ main() { if (trebleClef.length != 2) throw "String should be a surrogate pair"; // These uncaught exceptions should not caush the VM to crash attempting to // print a malformed string. - throw trebleClef[0]; // //# 01: runtime error - throw trebleClef[1]; // //# 02: runtime error + throw trebleClef[0]; // /// 01: runtime error + throw trebleClef[1]; // /// 02: runtime error } diff --git a/tests/corelib_strong/big_integer_arith_vm_test.dart b/tests/corelib_strong/big_integer_arith_vm_test.dart index e17f0a97f3e..f689d406b02 100644 --- a/tests/corelib_strong/big_integer_arith_vm_test.dart +++ b/tests/corelib_strong/big_integer_arith_vm_test.dart @@ -421,18 +421,18 @@ main() { for (int i = 0; i < 10; i++) { Expect.equals(1234567890123456789, foo()); Expect.equals(12345678901234567890, bar()); - testSmiOverflow(); // //# overflow: ok - testBigintAdd(); // //# add: ok - testBigintSub(); // //# sub: ok - testBigintMul(); // //# mul: ok - testBigintTruncDiv(); // //# trunDiv: ok - testBigintDiv(); // //# div: ok - testBigintModulo(); // //# mod: ok - testBigintModPow(); // //# modPow: ok - testBigintModInverse(); // //# modInv: ok - testBigintGcd(); // //# gcd: ok - testBigintNegate(); // //# negate: ok - testShiftAmount(); // //# shift: ok + testSmiOverflow(); // /// overflow: ok + testBigintAdd(); // /// add: ok + testBigintSub(); // /// sub: ok + testBigintMul(); // /// mul: ok + testBigintTruncDiv(); // /// trunDiv: ok + testBigintDiv(); // /// div: ok + testBigintModulo(); // /// mod: ok + testBigintModPow(); // /// modPow: ok + testBigintModInverse(); // /// modInv: ok + testBigintGcd(); // /// gcd: ok + testBigintNegate(); // /// negate: ok + testShiftAmount(); // /// shift: ok Expect.equals(12345678901234567890, (12345678901234567890).abs()); Expect.equals(12345678901234567890, (-12345678901234567890).abs()); var a = 10000000000000000000; diff --git a/tests/corelib_strong/bool_from_environment2_test.dart b/tests/corelib_strong/bool_from_environment2_test.dart index 0329c544611..0e6d410687e 100644 --- a/tests/corelib_strong/bool_from_environment2_test.dart +++ b/tests/corelib_strong/bool_from_environment2_test.dart @@ -3,9 +3,9 @@ // BSD-style license that can be found in the LICENSE file. main() { - const bool.fromEnvironment('NOT_FOUND', defaultValue: ''); // //# 01: compile-time error - const bool.fromEnvironment('NOT_FOUND', defaultValue: 1); // //# 02: compile-time error - const bool.fromEnvironment(null); // //# 03: compile-time error - const bool.fromEnvironment(1); // //# 04: compile-time error - const bool.fromEnvironment([]); // //# 05: compile-time error + const bool.fromEnvironment('NOT_FOUND', defaultValue: ''); // /// 01: compile-time error + const bool.fromEnvironment('NOT_FOUND', defaultValue: 1); // /// 02: compile-time error + const bool.fromEnvironment(null); // /// 03: compile-time error + const bool.fromEnvironment(1); // /// 04: compile-time error + const bool.fromEnvironment([]); // /// 05: compile-time error } diff --git a/tests/corelib_strong/double_parse_test.dart b/tests/corelib_strong/double_parse_test.dart index 135bd5380d3..4302dbd5aae 100644 --- a/tests/corelib_strong/double_parse_test.dart +++ b/tests/corelib_strong/double_parse_test.dart @@ -14,7 +14,7 @@ const whiteSpace = const [ "\x0b", "\x0c", "\x0d", - "\x85", // //# 01: ok + "\x85", // /// 01: ok "\xa0", "\u1680", "\u2000", @@ -233,26 +233,26 @@ void main() { "4555072551893136908362547791869486679949683240497058210285131854" "51396213837722826145437693412532098591327667236328125", 0.0); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000024703282292062327208828439643411068627545332140664243314532" //# 03: ok - "8041234170109088178685677591650492652607243027730579814636067699" //# 03: ok - "1112238669661707327453443265068702897439863329200619332642599205" //# 03: ok - "1806252781222000513169502627641523911022607448403553068808609405" //# 03: ok - "1727798181294290864842608522062097649849550765341204993205100587" //# 03: ok - "2127469658709242016690593998242808606978027857019419997429604579" //# 03: ok - "7572623273334010723772922131119806567715298322567005234345331218" //# 03: ok - "5169920860031716486480793611343761679481328431956040281530986197" //# 03: ok - "8304604971452253283193290744072288902141724247846767401941767720" //# 03: ok - "8561650585989659548591956327689896895290365125294085321852619688" //# 03: ok - "9863888974446146846024033780172178553364579041996676675092137151" //# 03: ok - "9705456298034409473812692774776868254618683783877327369245051207" //# 03: ok - "5931578479504396230612962142122846982018227555473696607567828620" //# 03: ok - "5497859173707553281928994692862033843994140625", // //# 03: ok - 5e-324); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000024703282292062327208828439643411068627545332140664243314532" /// 03: ok + "8041234170109088178685677591650492652607243027730579814636067699" /// 03: ok + "1112238669661707327453443265068702897439863329200619332642599205" /// 03: ok + "1806252781222000513169502627641523911022607448403553068808609405" /// 03: ok + "1727798181294290864842608522062097649849550765341204993205100587" /// 03: ok + "2127469658709242016690593998242808606978027857019419997429604579" /// 03: ok + "7572623273334010723772922131119806567715298322567005234345331218" /// 03: ok + "5169920860031716486480793611343761679481328431956040281530986197" /// 03: ok + "8304604971452253283193290744072288902141724247846767401941767720" /// 03: ok + "8561650585989659548591956327689896895290365125294085321852619688" /// 03: ok + "9863888974446146846024033780172178553364579041996676675092137151" /// 03: ok + "9705456298034409473812692774776868254618683783877327369245051207" /// 03: ok + "5931578479504396230612962142122846982018227555473696607567828620" /// 03: ok + "5497859173707553281928994692862033843994140625", // /// 03: ok + 5e-324); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -369,44 +369,44 @@ void main() { "8136843040991207538774075715754306035963544889052606784864342758" "900428165258489343614201061427593231201171875", 5e-324); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000074109846876186981626485318930233205854758970392148714663837" //# 02: ok - "8523751013260905313127797949754542453988569694847043168576596389" //# 02: ok - "9850655339096945981621940161728171894510697854671067917687257517" //# 02: ok - "7347315553307795408549809608457500958111373034747658096871009590" //# 02: ok - "9754422710047573078097111189357848386756539987835030152280559340" //# 02: ok - "4659373979179073872386829939581848166016912201945649993128979841" //# 02: ok - "1362062484498678713572180352209017023903285791732520220528974020" //# 02: ok - "8029068540216066123755499834026713000358124864790413857434018755" //# 02: ok - "2090159017259254714629617513415977493871857473787096164563890871" //# 02: ok - "8119841271673056017045493004705269590165763776884908267986972573" //# 02: ok - "3665217655679410725087643375608460039849049721491174630855395563" //# 02: ok - "54188641513168478436313080237596295773983001708984375", // //# 02: ok - 1e-323); // //# 02: ok - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000074109846876186981626485318930233205873343654412044724850344" //# 03: ok - "8923718677971811461747287833219166123210675953743507352131000861" //# 03: ok - "5508029119022396648780866584046796426383292609958261304514284249" //# 03: ok - "6061610746879932829188941791435548141415672575056325503240888674" //# 03: ok - "0040403932604439422384254107243478095284614859960753370503720954" //# 03: ok - "5808063977144841990843464643012899935961693114687389992568869106" //# 03: ok - "5599267374834247685403237712975952143398358575711517208866987110" //# 03: ok - "6349531233468788347546753834029761025748698485508885182206645314" //# 03: ok - "0639262948657591471263120659283236968907400986955900192071499065" //# 03: ok - "6496581595870337769532410323614883653969318176216473399700896902" //# 03: ok - "4282850500785430600410615352213843786678841324490411560469406158" //# 03: ok - "4550533979841101562169154890806946368370134291387467238490102415" //# 03: ok - "1863156959008792461225924284245693964036455110947393215135657241" //# 03: ok - "099571834741510656385798938572406768798828125", // //# 03: ok - 1e-323); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000074109846876186981626485318930233205854758970392148714663837" /// 02: ok + "8523751013260905313127797949754542453988569694847043168576596389" /// 02: ok + "9850655339096945981621940161728171894510697854671067917687257517" /// 02: ok + "7347315553307795408549809608457500958111373034747658096871009590" /// 02: ok + "9754422710047573078097111189357848386756539987835030152280559340" /// 02: ok + "4659373979179073872386829939581848166016912201945649993128979841" /// 02: ok + "1362062484498678713572180352209017023903285791732520220528974020" /// 02: ok + "8029068540216066123755499834026713000358124864790413857434018755" /// 02: ok + "2090159017259254714629617513415977493871857473787096164563890871" /// 02: ok + "8119841271673056017045493004705269590165763776884908267986972573" /// 02: ok + "3665217655679410725087643375608460039849049721491174630855395563" /// 02: ok + "54188641513168478436313080237596295773983001708984375", // /// 02: ok + 1e-323); // /// 02: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000074109846876186981626485318930233205873343654412044724850344" /// 03: ok + "8923718677971811461747287833219166123210675953743507352131000861" /// 03: ok + "5508029119022396648780866584046796426383292609958261304514284249" /// 03: ok + "6061610746879932829188941791435548141415672575056325503240888674" /// 03: ok + "0040403932604439422384254107243478095284614859960753370503720954" /// 03: ok + "5808063977144841990843464643012899935961693114687389992568869106" /// 03: ok + "5599267374834247685403237712975952143398358575711517208866987110" /// 03: ok + "6349531233468788347546753834029761025748698485508885182206645314" /// 03: ok + "0639262948657591471263120659283236968907400986955900192071499065" /// 03: ok + "6496581595870337769532410323614883653969318176216473399700896902" /// 03: ok + "4282850500785430600410615352213843786678841324490411560469406158" /// 03: ok + "4550533979841101562169154890806946368370134291387467238490102415" /// 03: ok + "1863156959008792461225924284245693964036455110947393215135657241" /// 03: ok + "099571834741510656385798938572406768798828125", // /// 03: ok + 1e-323); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -483,26 +483,26 @@ void main() { "0239620254961370692713747131027132020441991845959370908649389667" "01396213837722826145437693412532098591327667236328125", 1.1125369292536007e-308); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000011125369292" //# 03: ok - "5360093857793927928947412039400442434185228365340521456608629527" //# 03: ok - "0200315929606120759250932815416474352736201659755028987189999989" //# 03: ok - "3220987486513026766686796443888026815774211444057134206415720396" //# 03: ok - "3510525564718487986029401249963455450110781777556316353975973978" //# 03: ok - "4825173851725161436876623857879887229903814003929524302244972629" //# 03: ok - "6795040225381805100879491255387164751912585073962051947893527710" //# 03: ok - "5170790163081944841764003984818943810636714040207972316616704045" //# 03: ok - "0220895038833513659790739432367709097880422198053807344762226099" //# 03: ok - "3129277744388529754345873069706690065083079768940685222309466301" //# 03: ok - "4235389404255004774284573740536646273496781023858510820692328908" //# 03: ok - "0857253100067390568036719107632515767271783448958607838263400261" //# 03: ok - "9271291212296536333081616208300526650104600844121842238490102415" //# 03: ok - "1863156959008792461225924284245693964036455110947393215135657241" //# 03: ok - "099571834741510656385798938572406768798828125", // //# 03: ok - 1.112536929253601e-308); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000011125369292" /// 03: ok + "5360093857793927928947412039400442434185228365340521456608629527" /// 03: ok + "0200315929606120759250932815416474352736201659755028987189999989" /// 03: ok + "3220987486513026766686796443888026815774211444057134206415720396" /// 03: ok + "3510525564718487986029401249963455450110781777556316353975973978" /// 03: ok + "4825173851725161436876623857879887229903814003929524302244972629" /// 03: ok + "6795040225381805100879491255387164751912585073962051947893527710" /// 03: ok + "5170790163081944841764003984818943810636714040207972316616704045" /// 03: ok + "0220895038833513659790739432367709097880422198053807344762226099" /// 03: ok + "3129277744388529754345873069706690065083079768940685222309466301" /// 03: ok + "4235389404255004774284573740536646273496781023858510820692328908" /// 03: ok + "0857253100067390568036719107632515767271783448958607838263400261" /// 03: ok + "9271291212296536333081616208300526650104600844121842238490102415" /// 03: ok + "1863156959008792461225924284245693964036455110947393215135657241" /// 03: ok + "099571834741510656385798938572406768798828125", // /// 03: ok + 1.112536929253601e-308); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -561,44 +561,44 @@ void main() { "8136843040991207538774075715754306035963544889052606784864342758" "900428165258489343614201061427593231201171875", 1.112536929253601e-308); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 02: ok - "0000000000000000000000000000000000000000000000000000011125369292" //# 02: ok - "5360143264358512053601829696279729256322446286636762993074885578" //# 02: ok - "5482848940402484819383308231788212319506475197423260249353326444" //# 02: ok - "4130717265985540087275830129388183546908748591883986098046865342" //# 02: ok - "9694440740018214171090142139290408905547397593746087678853434622" //# 02: ok - "7708807769200010477987555066232823112546765790360487852208850575" //# 02: ok - "8752599546868752897347409845010678425979078962517411943872958339" //# 02: ok - "1841626929078828345647733525524686707077165117383988808631340302" //# 02: ok - "3919811372391502185169818655049136406061931820528945258278945377" //# 02: ok - "2640279824496362807465448266116748919295441238296611971177785355" //# 02: ok - "4605209927839760366494651758097211936470402475783551200969719627" //# 02: ok - "9349765358747644509438842714766105380341358326953487329219653376" //# 02: ok - "04188641513168478436313080237596295773983001708984375", // //# 02: ok - 1.1125369292536017e-308); // //# 02: ok - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000011125369292" //# 03: ok - "5360143264358512053601829696279729256322464871320782889085072085" //# 03: ok - "5882816605113390968002798115252835988728581456319724432907730915" //# 03: ok - "9788091045910990754434756551706808078781343347171179484873892074" //# 03: ok - "8408735933590351591729274322268456088851697134054755085223313705" //# 03: ok - "7994788991756876822274697984118452821074840662486211070432012189" //# 03: ok - "9901289544834521015804044548441730195923859875259151943312847604" //# 03: ok - "6078831819414397317478790886291621826572237901362985796969353392" //# 03: ok - "2240274065644224408961072655052184431452505441247416583051571936" //# 03: ok - "1189383755894699564098951411984008394330984751465415998685393549" //# 03: ok - "2981950252037042118981569077006826000273956875115116332683643956" //# 03: ok - "9967398203853664384761814691371489127171149929952724258833663970" //# 03: ok - "9550533979841101562169154890806946368370134291387467238490102415" //# 03: ok - "1863156959008792461225924284245693964036455110947393215135657241" //# 03: ok - "099571834741510656385798938572406768798828125", // //# 03: ok - 1.1125369292536017e-308); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 02: ok + "0000000000000000000000000000000000000000000000000000011125369292" /// 02: ok + "5360143264358512053601829696279729256322446286636762993074885578" /// 02: ok + "5482848940402484819383308231788212319506475197423260249353326444" /// 02: ok + "4130717265985540087275830129388183546908748591883986098046865342" /// 02: ok + "9694440740018214171090142139290408905547397593746087678853434622" /// 02: ok + "7708807769200010477987555066232823112546765790360487852208850575" /// 02: ok + "8752599546868752897347409845010678425979078962517411943872958339" /// 02: ok + "1841626929078828345647733525524686707077165117383988808631340302" /// 02: ok + "3919811372391502185169818655049136406061931820528945258278945377" /// 02: ok + "2640279824496362807465448266116748919295441238296611971177785355" /// 02: ok + "4605209927839760366494651758097211936470402475783551200969719627" /// 02: ok + "9349765358747644509438842714766105380341358326953487329219653376" /// 02: ok + "04188641513168478436313080237596295773983001708984375", // /// 02: ok + 1.1125369292536017e-308); // /// 02: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000011125369292" /// 03: ok + "5360143264358512053601829696279729256322464871320782889085072085" /// 03: ok + "5882816605113390968002798115252835988728581456319724432907730915" /// 03: ok + "9788091045910990754434756551706808078781343347171179484873892074" /// 03: ok + "8408735933590351591729274322268456088851697134054755085223313705" /// 03: ok + "7994788991756876822274697984118452821074840662486211070432012189" /// 03: ok + "9901289544834521015804044548441730195923859875259151943312847604" /// 03: ok + "6078831819414397317478790886291621826572237901362985796969353392" /// 03: ok + "2240274065644224408961072655052184431452505441247416583051571936" /// 03: ok + "1189383755894699564098951411984008394330984751465415998685393549" /// 03: ok + "2981950252037042118981569077006826000273956875115116332683643956" /// 03: ok + "9967398203853664384761814691371489127171149929952724258833663970" /// 03: ok + "9550533979841101562169154890806946368370134291387467238490102415" /// 03: ok + "1863156959008792461225924284245693964036455110947393215135657241" /// 03: ok + "099571834741510656385798938572406768798828125", // /// 03: ok + 1.1125369292536017e-308); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -674,26 +674,26 @@ void main() { "5924167958029604477064946470184777360934300451421683607013647479" "51396213837722826145437693412532098591327667236328125", 2.2250738585072014e-308); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000022250738585" //# 03: ok - "0720163012305563795567615250361241457301819893006892300968851267" //# 03: ok - "7159413856747700265506443097450144218254107162331246067966730043" //# 03: ok - "7501049413401620872340686411548038468172262181270052386775328221" //# 03: ok - "5857650751428906748569733780796363397546806336554745935958399010" //# 03: ok - "2779558910877598836767067734754861955694039806454982002173263865" //# 03: ok - "0888265793071484125840071160815995011874751834533813898637506208" //# 03: ok - "5650354607662094473839557158134613493810593365859440904719070326" //# 03: ok - "6111637871008949721205058253390132503584229153792338745607152721" //# 03: ok - "3679398551625637847181703822407461490506663533450201028923360785" //# 03: ok - "0720758060421709123733732493928588619801419722757153753675075962" //# 03: ok - "6541800803135624352387918446790161107764092054420920536627658074" //# 03: ok - "4271291212296536333081616208300526650104600844121842238490102415" //# 03: ok - "1863156959008792461225924284245693964036455110947393215135657241" //# 03: ok - "099571834741510656385798938572406768798828125", // //# 03: ok - 2.225073858507202e-308); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000022250738585" /// 03: ok + "0720163012305563795567615250361241457301819893006892300968851267" /// 03: ok + "7159413856747700265506443097450144218254107162331246067966730043" /// 03: ok + "7501049413401620872340686411548038468172262181270052386775328221" /// 03: ok + "5857650751428906748569733780796363397546806336554745935958399010" /// 03: ok + "2779558910877598836767067734754861955694039806454982002173263865" /// 03: ok + "0888265793071484125840071160815995011874751834533813898637506208" /// 03: ok + "5650354607662094473839557158134613493810593365859440904719070326" /// 03: ok + "6111637871008949721205058253390132503584229153792338745607152721" /// 03: ok + "3679398551625637847181703822407461490506663533450201028923360785" /// 03: ok + "0720758060421709123733732493928588619801419722757153753675075962" /// 03: ok + "6541800803135624352387918446790161107764092054420920536627658074" /// 03: ok + "4271291212296536333081616208300526650104600844121842238490102415" /// 03: ok + "1863156959008792461225924284245693964036455110947393215135657241" /// 03: ok + "099571834741510656385798938572406768798828125", // /// 03: ok + 2.225073858507202e-308); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -752,44 +752,44 @@ void main() { "8136843040991207538774075715754306035963544889052606784864342758" "900428165258489343614201061427593231201171875", 2.225073858507202e-308); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000022250738585" //# 03: ok - "0720212418870147920222032907240528279439037814303133837435107319" //# 03: ok - "2441946867544064325638818513821882185024380699999477330130056498" //# 03: ok - "8410779192874134192929720097048195199306799329096904278406473168" //# 03: ok - "2041565926728632933630474670123316852983422152744517260835859654" //# 03: ok - "5663192828352447877877998943107797838336991592885945552137141811" //# 03: ok - "2845825114558431922307989750439508685941245723089173894616936837" //# 03: ok - "2321191373658977977723286698840356390251044443035457396733706583" //# 03: ok - "9810554204566938246584137476071559811765738776267476659123871999" //# 03: ok - "3190400631733470900301279018817520344719025002806127777791679839" //# 03: ok - "1090578584006464715943810511489154282775041174682194133952466682" //# 03: ok - "5034313061815878293790042053923750720833666932415800027583911188" //# 03: ok - "54188641513168478436313080237596295773983001708984375", // //# 03: ok - 2.2250738585072024e-308); // //# 03: ok - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000022250738585" //# 03: ok - "0720212418870147920222032907240528279439056398987153733445293826" //# 03: ok - "2841914532254970474258308397286505854246486958895941513684460970" //# 03: ok - "4068152972799584860088646519366819731179394084384097665233499900" //# 03: ok - "0755861120300770354269606853101364036287721693053184667205738737" //# 03: ok - "5949174050909314222165141860993427546865066465011668770360303425" //# 03: ok - "3994515112524200040764624453870560455886026635830913894056826102" //# 03: ok - "6558396263994546949554344059607291509746117227014454385071719673" //# 03: ok - "8131016897819660470375391476074607837156312396985947983896498558" //# 03: ok - "1739504563131807656934782164684779819754568515974931805299288032" //# 03: ok - "9467318908203746468430727830398768346578595574013759265666391011" //# 03: ok - "5651945906921898169113014030529134467663458535415036957197921783" //# 03: ok - "4550533979841101562169154890806946368370134291387467238490102415" //# 03: ok - "1863156959008792461225924284245693964036455110947393215135657241" //# 03: ok - "099571834741510656385798938572406768798828125", // //# 03: ok - 2.2250738585072024e-308); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000022250738585" /// 03: ok + "0720212418870147920222032907240528279439037814303133837435107319" /// 03: ok + "2441946867544064325638818513821882185024380699999477330130056498" /// 03: ok + "8410779192874134192929720097048195199306799329096904278406473168" /// 03: ok + "2041565926728632933630474670123316852983422152744517260835859654" /// 03: ok + "5663192828352447877877998943107797838336991592885945552137141811" /// 03: ok + "2845825114558431922307989750439508685941245723089173894616936837" /// 03: ok + "2321191373658977977723286698840356390251044443035457396733706583" /// 03: ok + "9810554204566938246584137476071559811765738776267476659123871999" /// 03: ok + "3190400631733470900301279018817520344719025002806127777791679839" /// 03: ok + "1090578584006464715943810511489154282775041174682194133952466682" /// 03: ok + "5034313061815878293790042053923750720833666932415800027583911188" /// 03: ok + "54188641513168478436313080237596295773983001708984375", // /// 03: ok + 2.2250738585072024e-308); // /// 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000022250738585" /// 03: ok + "0720212418870147920222032907240528279439056398987153733445293826" /// 03: ok + "2841914532254970474258308397286505854246486958895941513684460970" /// 03: ok + "4068152972799584860088646519366819731179394084384097665233499900" /// 03: ok + "0755861120300770354269606853101364036287721693053184667205738737" /// 03: ok + "5949174050909314222165141860993427546865066465011668770360303425" /// 03: ok + "3994515112524200040764624453870560455886026635830913894056826102" /// 03: ok + "6558396263994546949554344059607291509746117227014454385071719673" /// 03: ok + "8131016897819660470375391476074607837156312396985947983896498558" /// 03: ok + "1739504563131807656934782164684779819754568515974931805299288032" /// 03: ok + "9467318908203746468430727830398768346578595574013759265666391011" /// 03: ok + "5651945906921898169113014030529134467663458535415036957197921783" /// 03: ok + "4550533979841101562169154890806946368370134291387467238490102415" /// 03: ok + "1863156959008792461225924284245693964036455110947393215135657241" /// 03: ok + "099571834741510656385798938572406768798828125", // /// 03: ok + 2.2250738585072024e-308); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -863,25 +863,25 @@ void main() { "8909645359318233784351199339157645340492308605462312698364257812" "5", 1.0020841800044864e-292); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000100208418000448650025174695" //# 03: ok - "1035150178458809017822159251011531515138151971877843746285762442" //# 03: ok - "8545112214057342269294258292239779301929355259416640067909319649" //# 03: ok - "7365336576866690449490575153391617964764463657240626936945707789" //# 03: ok - "0322677840073401894046998179185686691822730198820493814317137229" //# 03: ok - "5822164306994752582767555905533610628109411569344063803273395309" //# 03: ok - "4016739578124191615155910675820643598048478728683293279406596985" //# 03: ok - "3795142966229399885915374796852136102192598807080147602085351627" //# 03: ok - "7462738186176388661491270541112149644974737467220377156516124492" //# 03: ok - "5297987696655648150350049348782647584189423429523649017245633309" //# 03: ok - "0650703736050481424426844685046761507858235356421727632283550512" //# 03: ok - "9294184882356332903145058239310065886479547694117011957754993659" //# 03: ok - "5152049332041520812604025151794328168042160636342216519487980314" //# 03: ok - "421878240614097350935640662328296457417309284210205078125", // //# 03: ok - 1.0020841800044866e-292); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000100208418000448650025174695" /// 03: ok + "1035150178458809017822159251011531515138151971877843746285762442" /// 03: ok + "8545112214057342269294258292239779301929355259416640067909319649" /// 03: ok + "7365336576866690449490575153391617964764463657240626936945707789" /// 03: ok + "0322677840073401894046998179185686691822730198820493814317137229" /// 03: ok + "5822164306994752582767555905533610628109411569344063803273395309" /// 03: ok + "4016739578124191615155910675820643598048478728683293279406596985" /// 03: ok + "3795142966229399885915374796852136102192598807080147602085351627" /// 03: ok + "7462738186176388661491270541112149644974737467220377156516124492" /// 03: ok + "5297987696655648150350049348782647584189423429523649017245633309" /// 03: ok + "0650703736050481424426844685046761507858235356421727632283550512" /// 03: ok + "9294184882356332903145058239310065886479547694117011957754993659" /// 03: ok + "5152049332041520812604025151794328168042160636342216519487980314" /// 03: ok + "421878240614097350935640662328296457417309284210205078125", // /// 03: ok + 1.0020841800044866e-292); // /// 03: ok testParse("0.00000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" "0000000000000000000000000000000000000000000000000000000000000000" @@ -937,43 +937,43 @@ void main() { "4847950667958479187395974848205671831957839363657783480512019685" "578121759385902649064359337671703542582690715789794921875", 2.0041683600089726e-292); - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000200416836000897266674241512" //# 03: ok - "5990092893382710435783708701744713907322363070003179054747514262" //# 03: ok - "7385611700512865061525449421701203817286652851291627374287240329" //# 03: ok - "3753705169156289950978164746871212513772283206234057202629821353" //# 03: ok - "8809538439162226010550634208659737749820025430842192660178060615" //# 03: ok - "3474267718174236120090795958487048484027109406716660005865875254" //# 03: ok - "7540730218997620056025234843183240653494745917236268600971966054" //# 03: ok - "2572750817920844689872038240532666937066187074066929436725783508" //# 03: ok - "0513647350599865639683590212819431367049178252060735656411044144" //# 03: ok - "5314088186163138416702979387974756763836546863081940712096908853" //# 03: ok - "9929165937080868658779320353585122361868059050079309936626251244" //# 03: ok - "0765647609431766215648800660842354659507691394537687301635742187" //# 03: ok - "5", // //# 03: ok - 2.004168360008973e-292); // //# 03: ok - testParse("0.00000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000000000000000000000000000000" //# 03: ok - "0000000000000000000000000000000000000200416836000897266674241512" //# 03: ok - "5990092893382710435783708785442689934124446215379877007119186963" //# 03: ok - "1799271173601405540673717580039876412295823431198128133887844732" //# 03: ok - "7822096271111944266498822575337206743053529154538278267721206728" //# 03: ok - "1206759279588886755511816487266193645578706075743945771432529989" //# 03: ok - "5627720577353214542977288069464672781437627568914207256313896083" //# 03: ok - "6647266336088483105727658239269018534852601546443784653776612265" //# 03: ok - "4362171708319597782738064157144965045964873355636409438294693959" //# 03: ok - "3883447613213167389211587415988230219943616159642947883454256631" //# 03: ok - "7129850578881555219447792913718868827972321214300345663373246010" //# 03: ok - "5887233720340859229642766731751409169335306833113418201122555553" //# 03: ok - "1150187132469865334442659560994775205494930483192386561026478034" //# 03: ok - "5152049332041520812604025151794328168042160636342216519487980314" //# 03: ok - "421878240614097350935640662328296457417309284210205078125", // //# 03: ok - 2.004168360008973e-292); // //# 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000200416836000897266674241512" /// 03: ok + "5990092893382710435783708701744713907322363070003179054747514262" /// 03: ok + "7385611700512865061525449421701203817286652851291627374287240329" /// 03: ok + "3753705169156289950978164746871212513772283206234057202629821353" /// 03: ok + "8809538439162226010550634208659737749820025430842192660178060615" /// 03: ok + "3474267718174236120090795958487048484027109406716660005865875254" /// 03: ok + "7540730218997620056025234843183240653494745917236268600971966054" /// 03: ok + "2572750817920844689872038240532666937066187074066929436725783508" /// 03: ok + "0513647350599865639683590212819431367049178252060735656411044144" /// 03: ok + "5314088186163138416702979387974756763836546863081940712096908853" /// 03: ok + "9929165937080868658779320353585122361868059050079309936626251244" /// 03: ok + "0765647609431766215648800660842354659507691394537687301635742187" /// 03: ok + "5", // /// 03: ok + 2.004168360008973e-292); // /// 03: ok + testParse("0.00000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000000000000000000000000000000" /// 03: ok + "0000000000000000000000000000000000000200416836000897266674241512" /// 03: ok + "5990092893382710435783708785442689934124446215379877007119186963" /// 03: ok + "1799271173601405540673717580039876412295823431198128133887844732" /// 03: ok + "7822096271111944266498822575337206743053529154538278267721206728" /// 03: ok + "1206759279588886755511816487266193645578706075743945771432529989" /// 03: ok + "5627720577353214542977288069464672781437627568914207256313896083" /// 03: ok + "6647266336088483105727658239269018534852601546443784653776612265" /// 03: ok + "4362171708319597782738064157144965045964873355636409438294693959" /// 03: ok + "3883447613213167389211587415988230219943616159642947883454256631" /// 03: ok + "7129850578881555219447792913718868827972321214300345663373246010" /// 03: ok + "5887233720340859229642766731751409169335306833113418201122555553" /// 03: ok + "1150187132469865334442659560994775205494930483192386561026478034" /// 03: ok + "5152049332041520812604025151794328168042160636342216519487980314" /// 03: ok + "421878240614097350935640662328296457417309284210205078125", // /// 03: ok + 2.004168360008973e-292); // /// 03: ok testParse("0.99999999999999988897769753748434595763683319091796875", 0.9999999999999999); testParse("0.99999999999999988897769753748434595763683319091796879176194859" @@ -984,12 +984,12 @@ void main() { "4809443029054117700758095643512548748358614094344726684993771234" "576088145773464788135242997668683528900146484375", 0.9999999999999999); - testParse("0.999999999999999944488848768742172978818416595458984375", //# 03: ok - 1.0); // //# 03: ok - testParse("0.99999999999999994448884876874217297881841659545898441676194859" //# 03: ok - "5190556970945882299241904356487451251641385905655273315006228765" //# 03: ok - "423911854226535211864757002331316471099853515625", // //# 03: ok - 1.0); // //# 03: ok + testParse("0.999999999999999944488848768742172978818416595458984375", /// 03: ok + 1.0); // /// 03: ok + testParse("0.99999999999999994448884876874217297881841659545898441676194859" /// 03: ok + "5190556970945882299241904356487451251641385905655273315006228765" /// 03: ok + "423911854226535211864757002331316471099853515625", // /// 03: ok + 1.0); // /// 03: ok testParse("0.499999999999999944488848768742172978818416595458984375", 0.49999999999999994); testParse("0.49999999999999994448884876874217297881841659545898439588097429" @@ -1000,12 +1000,12 @@ void main() { "2404721514527058850379047821756274374179307047172363342496885617" "2880440728867323940676214988343417644500732421875", 0.49999999999999994); - testParse("0.4999999999999999722444243843710864894092082977294921875", //# 03: ok - 0.5); // //# 03: ok - testParse("0.49999999999999997224442438437108648940920829772949220838097429" //# 03: ok - "7595278485472941149620952178243725625820692952827636657503114382" //# 03: ok - "7119559271132676059323785011656582355499267578125", // //# 03: ok - 0.5); // //# 03: ok + testParse("0.4999999999999999722444243843710864894092082977294921875", /// 03: ok + 0.5); // /// 03: ok + testParse("0.49999999999999997224442438437108648940920829772949220838097429" /// 03: ok + "7595278485472941149620952178243725625820692952827636657503114382" /// 03: ok + "7119559271132676059323785011656582355499267578125", // /// 03: ok + 0.5); // /// 03: ok testParse("1.9999999999999997779553950749686919152736663818359375", 1.9999999999999998); testParse("1.99999999999999977795539507496869191527366638183593758352389719" @@ -1016,12 +1016,12 @@ void main() { "9618886058108235401516191287025097496717228188689453369987542469" "15217629154692957627048599533736705780029296875", 1.9999999999999998); - testParse("1.99999999999999988897769753748434595763683319091796875", //# 03: ok - 2.0); // //# 03: ok - testParse("1.99999999999999988897769753748434595763683319091796883352389719" //# 03: ok - "0381113941891764598483808712974902503282771811310546630012457530" //# 03: ok - "84782370845307042372951400466263294219970703125", // //# 03: ok - 2.0); // //# 03: ok + testParse("1.99999999999999988897769753748434595763683319091796875", /// 03: ok + 2.0); // /// 03: ok + testParse("1.99999999999999988897769753748434595763683319091796883352389719" /// 03: ok + "0381113941891764598483808712974902503282771811310546630012457530" /// 03: ok + "84782370845307042372951400466263294219970703125", // /// 03: ok + 2.0); // /// 03: ok testParse("4503599627370495.5", 4503599627370495.5); testParse("4503599627370495.50000000000000000000000000000000000018807909613" diff --git a/tests/corelib_strong/from_environment_const_type_test.dart b/tests/corelib_strong/from_environment_const_type_test.dart index fb9de9816a1..e68ac4f3900 100644 --- a/tests/corelib_strong/from_environment_const_type_test.dart +++ b/tests/corelib_strong/from_environment_const_type_test.dart @@ -8,31 +8,31 @@ import "package:expect/expect.dart"; class Foo {} const - bool // //# 01: ok - int // //# 02: static type warning, checked mode compile-time error - String // //# 03: static type warning, checked mode compile-time error - Foo // //# 04: static type warning, checked mode compile-time error + bool // /// 01: ok + int // /// 02: static type warning, checked mode compile-time error + String // /// 03: static type warning, checked mode compile-time error + Foo // /// 04: static type warning, checked mode compile-time error a = const bool.fromEnvironment('a'); const - bool // //# 05: ok - int // //# 06: static type warning, checked mode compile-time error - String // //# 07: static type warning, checked mode compile-time error - Foo // //# 08: static type warning, checked mode compile-time error + bool // /// 05: ok + int // /// 06: static type warning, checked mode compile-time error + String // /// 07: static type warning, checked mode compile-time error + Foo // /// 08: static type warning, checked mode compile-time error b = const bool.fromEnvironment('b'); const - bool // //# 09: static type warning, checked mode compile-time error - int // //# 10: ok - String // //# 11: static type warning, checked mode compile-time error - Foo // //# 12: static type warning, checked mode compile-time error + bool // /// 09: static type warning, checked mode compile-time error + int // /// 10: ok + String // /// 11: static type warning, checked mode compile-time error + Foo // /// 12: static type warning, checked mode compile-time error c = const int.fromEnvironment('c'); const - bool // //# 13: static type warning, checked mode compile-time error - int // //# 14: static type warning, checked mode compile-time error - String // //# 15: ok - Foo // //# 16: static type warning, checked mode compile-time error + bool // /// 13: static type warning, checked mode compile-time error + int // /// 14: static type warning, checked mode compile-time error + String // /// 15: ok + Foo // /// 16: static type warning, checked mode compile-time error d = const String.fromEnvironment('d'); main() { diff --git a/tests/corelib_strong/from_environment_const_type_undefined_test.dart b/tests/corelib_strong/from_environment_const_type_undefined_test.dart index 076fa7e144c..7cda78fad1e 100644 --- a/tests/corelib_strong/from_environment_const_type_undefined_test.dart +++ b/tests/corelib_strong/from_environment_const_type_undefined_test.dart @@ -7,31 +7,31 @@ import "package:expect/expect.dart"; class Foo {} const - bool // //# 01: ok - int // //# 02: static type warning, checked mode compile-time error - String //# 03: static type warning, checked mode compile-time error - Foo // //# 04: static type warning, checked mode compile-time error + bool // /// 01: ok + int // /// 02: static type warning, checked mode compile-time error + String /// 03: static type warning, checked mode compile-time error + Foo // /// 04: static type warning, checked mode compile-time error a = const bool.fromEnvironment('a'); const - bool // //# 05: ok - int // //# 06: static type warning, checked mode compile-time error - String //# 07: static type warning, checked mode compile-time error - Foo // //# 08: static type warning, checked mode compile-time error + bool // /// 05: ok + int // /// 06: static type warning, checked mode compile-time error + String /// 07: static type warning, checked mode compile-time error + Foo // /// 08: static type warning, checked mode compile-time error b = const bool.fromEnvironment('b'); const - bool // //# 09: static type warning - int // //# 10: ok - String //# 11: static type warning - Foo // //# 12: static type warning + bool // /// 09: static type warning + int // /// 10: ok + String /// 11: static type warning + Foo // /// 12: static type warning c = const int.fromEnvironment('c'); const - bool // //# 13: static type warning - int // //# 14: static type warning - String //# 15: ok - Foo // //# 16: static type warning + bool // /// 13: static type warning + int // /// 14: static type warning + String /// 15: ok + Foo // /// 16: static type warning d = const String.fromEnvironment('d'); main() { diff --git a/tests/corelib_strong/hash_set_test.dart b/tests/corelib_strong/hash_set_test.dart index 831bf0c8243..29b202d3cf0 100644 --- a/tests/corelib_strong/hash_set_test.dart +++ b/tests/corelib_strong/hash_set_test.dart @@ -285,7 +285,7 @@ void testIdentitySet(Set create()) { // All compile time constants are identical to themselves. var constants = [double.INFINITY, - double.NAN, -0.0, //# 01: ok + double.NAN, -0.0, /// 01: ok 0.0, 42, "", null, false, true, #bif, testIdentitySet]; set.addAll(constants); Expect.equals(constants.length, set.length); diff --git a/tests/corelib_strong/hidden_library2_test.dart b/tests/corelib_strong/hidden_library2_test.dart index 637cd940779..dd12cd28f15 100644 --- a/tests/corelib_strong/hidden_library2_test.dart +++ b/tests/corelib_strong/hidden_library2_test.dart @@ -9,7 +9,7 @@ main() { print(['x'].where((_) { // We actually don't really care for the successful case. We just want to // make sure that the test doesn't crash when it is negative. - throw 'fisk'; // //# 01: runtime error + throw 'fisk'; // /// 01: runtime error return true; }).toList()); } diff --git a/tests/corelib_strong/int_from_environment3_test.dart b/tests/corelib_strong/int_from_environment3_test.dart index 996338a2593..648b8d62481 100644 --- a/tests/corelib_strong/int_from_environment3_test.dart +++ b/tests/corelib_strong/int_from_environment3_test.dart @@ -3,9 +3,9 @@ // BSD-style license that can be found in the LICENSE file. main() { - const int.fromEnvironment('NOT_FOUND', defaultValue: ''); // //# 01: compile-time error - const int.fromEnvironment('NOT_FOUND', defaultValue: true); // //# 02: compile-time error - const int.fromEnvironment(null); // //# 03: compile-time error - const int.fromEnvironment(1); // //# 04: compile-time error - const int.fromEnvironment([]); // //# 05: compile-time error + const int.fromEnvironment('NOT_FOUND', defaultValue: ''); // /// 01: compile-time error + const int.fromEnvironment('NOT_FOUND', defaultValue: true); // /// 02: compile-time error + const int.fromEnvironment(null); // /// 03: compile-time error + const int.fromEnvironment(1); // /// 04: compile-time error + const int.fromEnvironment([]); // /// 05: compile-time error } diff --git a/tests/corelib_strong/int_modulo_arith_test.dart b/tests/corelib_strong/int_modulo_arith_test.dart index 9b696f36d37..404a21d8638 100644 --- a/tests/corelib_strong/int_modulo_arith_test.dart +++ b/tests/corelib_strong/int_modulo_arith_test.dart @@ -118,7 +118,7 @@ testModInverse() { test(137, smallNumber, 856087223); test(mediumNumber, 137, 77); test(137, mediumNumber, 540686667207353); - test(bigNumber, 137, 128); // //# bignum: ok + test(bigNumber, 137, 128); // /// bignum: ok // Bigger numbers as modulo is tested in big_integer_arith_vm_test.dart. // Big doubles are not co-prime, so there is nothing to test for dart2js. } @@ -203,7 +203,7 @@ testGcd() { } main() { - testModPow(); // //# modPow: ok + testModPow(); // /// modPow: ok testModInverse(); testGcd(); } diff --git a/tests/corelib_strong/int_parse_radix_test.dart b/tests/corelib_strong/int_parse_radix_test.dart index d44c50ef351..c46ff90d7f4 100644 --- a/tests/corelib_strong/int_parse_radix_test.dart +++ b/tests/corelib_strong/int_parse_radix_test.dart @@ -9,7 +9,7 @@ void main() { bool checkedMode = false; assert((checkedMode = true)); const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20" - "\x85" //# 01: ok + "\x85" /// 01: ok "\xa0"; const String whiteSpace = "$oneByteWhiteSpace\u1680" "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a" @@ -61,21 +61,21 @@ void main() { } } - for (int i = 2; i <= 36; i++) { // //# 02: ok - // Test with bignums. // //# 02: continued - var digit = digits[i - 1]; // //# 02: continued - testParse(pow(i, 64) - 1, digit * 64, i); // //# 02: continued - testParse(0, zeros, i); // //# 02: continued - } // //# 02: continued + for (int i = 2; i <= 36; i++) { // /// 02: ok + // Test with bignums. // /// 02: continued + var digit = digits[i - 1]; // /// 02: continued + testParse(pow(i, 64) - 1, digit * 64, i); // /// 02: continued + testParse(0, zeros, i); // /// 02: continued + } // /// 02: continued // Allow both upper- and lower-case letters. Expect.equals(0xABCD, int.parse("ABCD", radix: 16)); Expect.equals(0xABCD, int.parse("abcd", radix: 16)); Expect.equals(15628859, int.parse("09azAZ", radix: 36)); // Big number. - Expect.equals(0x12345678123456781234567812345678, // //# 02: continued - int.parse("0x1234567812345678" // //# 02: continued - "1234567812345678")); // //# 02: continued + Expect.equals(0x12345678123456781234567812345678, // /// 02: continued + int.parse("0x1234567812345678" // /// 02: continued + "1234567812345678")); // /// 02: continued // Allow whitespace before and after the number. Expect.equals(1, int.parse(" 1", radix: 2)); Expect.equals(1, int.parse("1 ", radix: 2)); diff --git a/tests/corelib_strong/integer_to_string_test.dart b/tests/corelib_strong/integer_to_string_test.dart index b96f6f0543c..53c4d95305d 100644 --- a/tests/corelib_strong/integer_to_string_test.dart +++ b/tests/corelib_strong/integer_to_string_test.dart @@ -51,22 +51,22 @@ main() { // ~2^53. test(0x1fffffffffffff, "9007199254740991"); test(0x20000000000000, "9007199254740992"); - test(0x20000000000001, "9007199254740993"); // //# 01: ok + test(0x20000000000001, "9007199254740993"); // /// 01: ok // ~2^62. - test(0x3fffffffffffffff, "4611686018427387903"); // //# 01: continued - test(0x4000000000000000, "4611686018427387904"); // //# 01: continued - test(0x4000000000000001, "4611686018427387905"); // //# 01: continued + test(0x3fffffffffffffff, "4611686018427387903"); // /// 01: continued + test(0x4000000000000000, "4611686018427387904"); // /// 01: continued + test(0x4000000000000001, "4611686018427387905"); // /// 01: continued // ~2^63. - test(0x7fffffffffffffff, "9223372036854775807"); // //# 01: continued - test(0x8000000000000000, "9223372036854775808"); // //# 01: continued - test(0x8000000000000001, "9223372036854775809"); // //# 01: continued + test(0x7fffffffffffffff, "9223372036854775807"); // /// 01: continued + test(0x8000000000000000, "9223372036854775808"); // /// 01: continued + test(0x8000000000000001, "9223372036854775809"); // /// 01: continued // ~2^64. - test(0xffffffffffffffff, "18446744073709551615"); // //# 01: continued - test(0x10000000000000000, "18446744073709551616"); // //# 01: continued - test(0x10000000000000001, "18446744073709551617"); // //# 01: continued + test(0xffffffffffffffff, "18446744073709551615"); // /// 01: continued + test(0x10000000000000000, "18446744073709551616"); // /// 01: continued + test(0x10000000000000001, "18446744073709551617"); // /// 01: continued // Big bignum. - test(123456789012345678901234567890, // //# 01: continued - "123456789012345678901234567890"); // //# 01: continued + test(123456789012345678901234567890, // /// 01: continued + "123456789012345678901234567890"); // /// 01: continued // Decimal special cases. @@ -79,10 +79,10 @@ main() { number *= 10; } // Fails to represent exactly in dart2js. - for (int i = 15; i < 22; i++) { // //# 01: continued - test(number - 1, "9" * i); // //# 01: continued - test(number, "1" + "0" * i); // //# 01: continued - test(number + 1, "1" + "0" * (i - 1) + "1"); // //# 01: continued - number *= 10; // //# 01: continued - } // //# 01: continued + for (int i = 15; i < 22; i++) { // /// 01: continued + test(number - 1, "9" * i); // /// 01: continued + test(number, "1" + "0" * i); // /// 01: continued + test(number + 1, "1" + "0" * (i - 1) + "1"); // /// 01: continued + number *= 10; // /// 01: continued + } // /// 01: continued } diff --git a/tests/corelib_strong/iterable_return_type_test.dart b/tests/corelib_strong/iterable_return_type_test.dart index b492478fc21..941da36d98c 100644 --- a/tests/corelib_strong/iterable_return_type_test.dart +++ b/tests/corelib_strong/iterable_return_type_test.dart @@ -63,14 +63,14 @@ main() { testList(new List.generate(1, (x) => x + 1)); // Typed lists. - testList(new Uint8List(1)..[0] = 1); // //# 01: ok - testList(new Int8List(1)..[0] = 1); // //# 01: continued - testList(new Uint16List(1)..[0] = 1); // //# 01: continued - testList(new Int16List(1)..[0] = 1); // //# 01: continued - testList(new Uint32List(1)..[0] = 1); // //# 01: continued - testList(new Int32List(1)..[0] = 1); // //# 01: continued - testList(new Uint64List(1)..[0] = 1); // //# 02: ok - testList(new Int64List(1)..[0] = 1); // //# 02: continued + testList(new Uint8List(1)..[0] = 1); // /// 01: ok + testList(new Int8List(1)..[0] = 1); // /// 01: continued + testList(new Uint16List(1)..[0] = 1); // /// 01: continued + testList(new Int16List(1)..[0] = 1); // /// 01: continued + testList(new Uint32List(1)..[0] = 1); // /// 01: continued + testList(new Int32List(1)..[0] = 1); // /// 01: continued + testList(new Uint64List(1)..[0] = 1); // /// 02: ok + testList(new Int64List(1)..[0] = 1); // /// 02: continued testIterable(new Set()..add(1)); testIterable(new HashSet()..add(1)); diff --git a/tests/corelib_strong/list_test.dart b/tests/corelib_strong/list_test.dart index 8d6df271327..75d33e98bb0 100644 --- a/tests/corelib_strong/list_test.dart +++ b/tests/corelib_strong/list_test.dart @@ -582,7 +582,7 @@ class MyFixedList extends ListBase { void testListConstructor() { Expect.throws(() { new List(0).add(4); }); // Is fixed-length. - Expect.throws(() { new List(-2); }); // Not negative. //# 01: ok + Expect.throws(() { new List(-2); }); // Not negative. /// 01: ok Expect.throws(() { new List(null); }); // Not null. Expect.listEquals([4], new List()..add(4)); Expect.throws(() { new List.filled(0, 42).add(4); }); // Is fixed-length. diff --git a/tests/corelib_strong/nan_infinity_test.dart b/tests/corelib_strong/nan_infinity_test.dart index bb8b1a7bb25..96088575bf5 100644 --- a/tests/corelib_strong/nan_infinity_test.dart +++ b/tests/corelib_strong/nan_infinity_test.dart @@ -48,7 +48,7 @@ void main() { Expect.equals("-Infinity", double.NEGATIVE_INFINITY.toString()); // Test identities. - Expect.isTrue(identical(double.NAN, double.NAN)); // //# 01: ok + Expect.isTrue(identical(double.NAN, double.NAN)); // /// 01: ok Expect.isTrue(identical(double.INFINITY, double.INFINITY)); Expect.isTrue(identical(double.NEGATIVE_INFINITY, double.NEGATIVE_INFINITY)); Expect.isFalse(identical(double.NAN, double.INFINITY)); diff --git a/tests/corelib_strong/num_parse_test.dart b/tests/corelib_strong/num_parse_test.dart index 15cbcadf578..e3c0a7034e3 100644 --- a/tests/corelib_strong/num_parse_test.dart +++ b/tests/corelib_strong/num_parse_test.dart @@ -157,7 +157,7 @@ void main() { testDouble(9007199254740992.0); testDouble(1.7976931348623157e+308); testDouble(double.INFINITY); - testDouble(double.NAN); // //# 01: ok + testDouble(double.NAN); // /// 01: ok // Strings that cannot occur from toString of a number. testParse("000000000000", 0); diff --git a/tests/corelib_strong/print_test.dart b/tests/corelib_strong/print_test.dart index 2cbe731e963..32f19488712 100644 --- a/tests/corelib_strong/print_test.dart +++ b/tests/corelib_strong/print_test.dart @@ -7,7 +7,7 @@ import 'package:expect/expect.dart'; class A { toString() { if (false - || true // //# 01: runtime error + || true // /// 01: runtime error ) { return 499; } else { diff --git a/tests/corelib_strong/string_case_test.dart b/tests/corelib_strong/string_case_test.dart index b199de732bf..fe30ad1a1b5 100644 --- a/tests/corelib_strong/string_case_test.dart +++ b/tests/corelib_strong/string_case_test.dart @@ -21,30 +21,30 @@ void testSpecialCases() { // Letters in Latin-1 where the upper case is not in Latin-1. // German sharp s. Upper case variant is "SS". - Expect.equals("SS", "\xdf".toUpperCase()); // //# 01: ok + Expect.equals("SS", "\xdf".toUpperCase()); // /// 01: ok Expect.equals("\xdf", "\xdf".toLowerCase()); - Expect.equals("ss", "\xdf".toUpperCase().toLowerCase()); // //# 01: continued + Expect.equals("ss", "\xdf".toUpperCase().toLowerCase()); // /// 01: continued // Micro sign (not same as lower-case Greek letter mu, U+03BC). - Expect.equals("\u039c", "\xb5".toUpperCase()); // //# 02: ok + Expect.equals("\u039c", "\xb5".toUpperCase()); // /// 02: ok Expect.equals("\xb5", "\xb5".toLowerCase()); - Expect.equals("\u03Bc", // //# 02: continued - "\xb5".toUpperCase().toLowerCase()); // //# 02: continued + Expect.equals("\u03Bc", // /// 02: continued + "\xb5".toUpperCase().toLowerCase()); // /// 02: continued // Small letter y diaresis. - Expect.equals("\u0178", "\xff".toUpperCase()); // //# 03: ok + Expect.equals("\u0178", "\xff".toUpperCase()); // /// 03: ok Expect.equals("\xff", "\xff".toLowerCase()); - Expect.equals("\xff", "\xff".toUpperCase().toLowerCase()); // //# 03: continued + Expect.equals("\xff", "\xff".toUpperCase().toLowerCase()); // /// 03: continued // Zero. Expect.equals("\x00", "\x00".toLowerCase()); Expect.equals("\x00", "\x00".toUpperCase()); // Test all combinations of ordering of lower-case, upper-case and // special-when-upper-cased characters. - Expect.equals("AA\u0178", "Aa\xff".toUpperCase()); // //# 03: continued - Expect.equals("AA\u0178", "aA\xff".toUpperCase()); // //# 03: continued - Expect.equals("A\u0178A", "A\xffa".toUpperCase()); // //# 03: continued - Expect.equals("A\u0178A", "a\xffA".toUpperCase()); // //# 03: continued - Expect.equals("\u0178AA", "\xffAa".toUpperCase()); // //# 03: continued - Expect.equals("\u0178AA", "\xffaA".toUpperCase()); // //# 03: continued + Expect.equals("AA\u0178", "Aa\xff".toUpperCase()); // /// 03: continued + Expect.equals("AA\u0178", "aA\xff".toUpperCase()); // /// 03: continued + Expect.equals("A\u0178A", "A\xffa".toUpperCase()); // /// 03: continued + Expect.equals("A\u0178A", "a\xffA".toUpperCase()); // /// 03: continued + Expect.equals("\u0178AA", "\xffAa".toUpperCase()); // /// 03: continued + Expect.equals("\u0178AA", "\xffaA".toUpperCase()); // /// 03: continued Expect.equals("aa\xff", "Aa\xff".toLowerCase()); Expect.equals("aa\xff", "aA\xff".toLowerCase()); diff --git a/tests/corelib_strong/string_from_environment3_test.dart b/tests/corelib_strong/string_from_environment3_test.dart index 962f5f1de05..21af283b8ef 100644 --- a/tests/corelib_strong/string_from_environment3_test.dart +++ b/tests/corelib_strong/string_from_environment3_test.dart @@ -3,9 +3,9 @@ // BSD-style license that can be found in the LICENSE file. main() { - const String.fromEnvironment('NOT_FOUND', defaultValue: 1); // //# 01: compile-time error - const String.fromEnvironment('NOT_FOUND', defaultValue: true); // //# 02: compile-time error - const String.fromEnvironment(null); // //# 03: compile-time error - const String.fromEnvironment(1); // //# 04: compile-time error - const String.fromEnvironment([]); // //# 05: compile-time error + const String.fromEnvironment('NOT_FOUND', defaultValue: 1); // /// 01: compile-time error + const String.fromEnvironment('NOT_FOUND', defaultValue: true); // /// 02: compile-time error + const String.fromEnvironment(null); // /// 03: compile-time error + const String.fromEnvironment(1); // /// 04: compile-time error + const String.fromEnvironment([]); // /// 05: compile-time error } diff --git a/tests/corelib_strong/string_trimlr_test.dart b/tests/corelib_strong/string_trimlr_test.dart index bada40e9a9c..67276fda532 100644 --- a/tests/corelib_strong/string_trimlr_test.dart +++ b/tests/corelib_strong/string_trimlr_test.dart @@ -92,7 +92,7 @@ main() { // This line makes string_trimlr_test/none fail but /01 succeede where // this bug is in the JS. Both succeede on the VM and where the bug is // not. Remove this line and comment if all JS engines fix it. - if (i == 0x200b) continue; // //# 01: ok + if (i == 0x200b) continue; // /// 01: ok var s = new String.fromCharCode(i); Expect.identical(s, s.trimLeft()); diff --git a/tests/corelib_strong/symbol_operator_test.dart b/tests/corelib_strong/symbol_operator_test.dart index 753aec5c127..e9b9e65ec3e 100644 --- a/tests/corelib_strong/symbol_operator_test.dart +++ b/tests/corelib_strong/symbol_operator_test.dart @@ -28,14 +28,14 @@ main() { testSymbol(#[]=, ($[$]=$).lastMember, "[]="); testSymbol(const Symbol("unary-"), -$, "unary-"); - testSymbolThrows(">>>"); // //# 03: ok - testSymbolThrows("!"); // //# 03: continued - testSymbolThrows("&&"); // //# 03: continued - testSymbolThrows("||"); // //# 03: continued - testSymbolThrows("?"); // //# 03: continued - testSymbolThrows("?:"); // //# 03: continued - testSymbolThrows("#"); // //# 03: continued - testSymbolThrows("//"); // //# 03: continued + testSymbolThrows(">>>"); // /// 03: ok + testSymbolThrows("!"); // /// 03: continued + testSymbolThrows("&&"); // /// 03: continued + testSymbolThrows("||"); // /// 03: continued + testSymbolThrows("?"); // /// 03: continued + testSymbolThrows("?:"); // /// 03: continued + testSymbolThrows("#"); // /// 03: continued + testSymbolThrows("//"); // /// 03: continued } void testSymbol(Symbol constSymbol, var mirrorSymbol, String name) { diff --git a/tests/corelib_strong/symbol_reserved_word_test.dart b/tests/corelib_strong/symbol_reserved_word_test.dart index ead7909e2a6..a103dcd614e 100644 --- a/tests/corelib_strong/symbol_reserved_word_test.dart +++ b/tests/corelib_strong/symbol_reserved_word_test.dart @@ -12,113 +12,113 @@ 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 + 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 - x = #void.foo; // //# 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 + x = const Symbol('void.foo'); // /// 04: compile-time error + x = #void.foo; // /// 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 = #assert; // //# 11: compile-time error - 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 = #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 + 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 = #assert; // /// 11: compile-time error + 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 = #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 } diff --git a/tests/corelib_strong/symbol_test.dart b/tests/corelib_strong/symbol_test.dart index 6b97092a670..0bdb0946341 100644 --- a/tests/corelib_strong/symbol_test.dart +++ b/tests/corelib_strong/symbol_test.dart @@ -9,7 +9,7 @@ main() { print(x = const Symbol('fisk')); try { - print(const Symbol(0)); //# 01: compile-time error + print(const Symbol(0)); /// 01: compile-time error } on NoSuchMethodError { print('Caught NoSuchMethodError'); } on TypeError { @@ -17,13 +17,13 @@ main() { } try { - print(const Symbol('0')); //# 02: compile-time error + print(const Symbol('0')); /// 02: compile-time error } on ArgumentError catch (e) { print('Caught $e'); } try { - print(const Symbol('_')); //# 03: compile-time error + print(const Symbol('_')); /// 03: compile-time error } on ArgumentError catch (e) { print('Caught $e'); } diff --git a/tests/corelib_strong/throw_half_surrogate_pair_test.dart b/tests/corelib_strong/throw_half_surrogate_pair_test.dart index a3545b2e3a8..8e0f98a1ff1 100644 --- a/tests/corelib_strong/throw_half_surrogate_pair_test.dart +++ b/tests/corelib_strong/throw_half_surrogate_pair_test.dart @@ -7,6 +7,6 @@ main() { if (trebleClef.length != 2) throw "String should be a surrogate pair"; // These uncaught exceptions should not caush the VM to crash attempting to // print a malformed string. - throw trebleClef[0]; // //# 01: runtime error - throw trebleClef[1]; // //# 02: runtime error + throw trebleClef[0]; // /// 01: runtime error + throw trebleClef[1]; // /// 02: runtime error } diff --git a/tests/html/js_typed_interop_default_arg_test.dart b/tests/html/js_typed_interop_default_arg_test.dart index b80b45cced6..406f260ad8f 100644 --- a/tests/html/js_typed_interop_default_arg_test.dart +++ b/tests/html/js_typed_interop_default_arg_test.dart @@ -27,7 +27,7 @@ _injectJs() { class Foo { // Note: it's invalid to provide a default value. external static num get42([num b - = 3 // //# default_value: compile-time error + = 3 // /// default_value: compile-time error ]); external static num get43([num b]); } @@ -43,14 +43,14 @@ main() { test('call tearoff from dart with arg', () { var f = Foo.get42; - expect(f(2), 2); //# explicit_argument: ok + expect(f(2), 2); /// explicit_argument: ok }); test('call tearoff from dart with default', () { var f = Foo.get42; // Note: today both SSA and CPS remove the extra argument on static calls, // but they fail to do so on tearoffs. - expect(f(), 3); //# default_value: continued + expect(f(), 3); /// default_value: continued f = Foo.get43; expect(f(), 43); diff --git a/tests/html/js_typed_interop_type1_test.dart b/tests/html/js_typed_interop_type1_test.dart index 8e62838b3e2..bbb6ec5564a 100644 --- a/tests/html/js_typed_interop_type1_test.dart +++ b/tests/html/js_typed_interop_type1_test.dart @@ -53,7 +53,7 @@ main() { var f = new F(6); Expect.equals(testA(a), 1); - Expect.equals(testF(f), 6); //# 01: ok + Expect.equals(testF(f), 6); /// 01: ok } diff --git a/tests/html/js_typed_interop_type2_test.dart b/tests/html/js_typed_interop_type2_test.dart index 440a3b152b4..6b3dbed3a4f 100644 --- a/tests/html/js_typed_interop_type2_test.dart +++ b/tests/html/js_typed_interop_type2_test.dart @@ -47,7 +47,7 @@ main() { var d = new D(foo: 4); var f = new F(6); Expect.equals(testC(d), 4); - Expect.equals(testF(f), 6); //# 01: ok + Expect.equals(testF(f), 6); /// 01: ok } diff --git a/tests/html/js_typed_interop_type3_test.dart b/tests/html/js_typed_interop_type3_test.dart index da4479444af..f32d9f3e603 100644 --- a/tests/html/js_typed_interop_type3_test.dart +++ b/tests/html/js_typed_interop_type3_test.dart @@ -79,10 +79,10 @@ main() { var a = new A(1); var d = new D(foo: 4); - Expect.equals(testA(a), 1); //# 01: ok - Expect.equals(testA(a), 1); //# 02: ok + Expect.equals(testA(a), 1); /// 01: ok + Expect.equals(testA(a), 1); /// 02: ok Expect.equals(testA(d), 4); - Expect.equals(testD(d), 4); //# 02: continued + Expect.equals(testD(d), 4); /// 02: continued } diff --git a/tests/isolate/compile_time_error_test.dart b/tests/isolate/compile_time_error_test.dart index 2cc98aef381..9c61fa34967 100644 --- a/tests/isolate/compile_time_error_test.dart +++ b/tests/isolate/compile_time_error_test.dart @@ -14,7 +14,7 @@ class TestClass { TestClass.named(num this.fld1) // Should cause a compilation error (for the spawned isolate). It is a // runtime error for the test. - : fld2 = this.fld1 // //# 01: compile-time error + : fld2 = this.fld1 // /// 01: compile-time error ; num fld1; num fld2; diff --git a/tests/isolate/enum_const_test.dart b/tests/isolate/enum_const_test.dart index 0b637941024..4654cdcff36 100644 --- a/tests/isolate/enum_const_test.dart +++ b/tests/isolate/enum_const_test.dart @@ -14,8 +14,8 @@ verify(val) { } main() { - test1(); //# 01: ok - test2(); //# 02: ok + test1(); /// 01: ok + test2(); /// 02: ok } test1() => verify(Foo.BAR); diff --git a/tests/isolate/isolate_import_test.dart b/tests/isolate/isolate_import_test.dart index f137a83f027..3cbb47c9142 100644 --- a/tests/isolate/isolate_import_test.dart +++ b/tests/isolate/isolate_import_test.dart @@ -4,9 +4,9 @@ library IsolateImportNegativeTest; // Omitting the following import is an error: -/* // //# 01: runtime error, static type warning +/* // /// 01: runtime error, static type warning import 'dart:isolate'; -*/ // //# 01: continued +*/ // /// 01: continued import 'package:async_helper/async_helper.dart'; void entry(msg) {} diff --git a/tests/isolate/issue_21398_parent_isolate2_test.dart b/tests/isolate/issue_21398_parent_isolate2_test.dart index f67ae10b88c..da94b56c17c 100644 --- a/tests/isolate/issue_21398_parent_isolate2_test.dart +++ b/tests/isolate/issue_21398_parent_isolate2_test.dart @@ -53,5 +53,5 @@ void helperFunction() { } main() { - helperFunction(); //# 01: runtime error + helperFunction(); /// 01: runtime error } diff --git a/tests/isolate/message3_test.dart b/tests/isolate/message3_test.dart index 206e7a6d4d9..785a0539488 100644 --- a/tests/isolate/message3_test.dart +++ b/tests/isolate/message3_test.dart @@ -151,10 +151,10 @@ void runTests(SendPort ping, Queue checks) { Expect.isTrue(x is List); Expect.listEquals([1, 2], x); // Make sure the list is immutable. - Expect.throws(() => x[0] = 0); // //# constList: ok + Expect.throws(() => x[0] = 0); // /// constList: ok // List must not be extendable. Expect.throws(() => x.add(3)); - Expect.identical(x, constList); // //# constList_identical: ok + Expect.identical(x, constList); // /// constList_identical: ok }); Uint8List uint8 = new Uint8List(2); @@ -172,8 +172,8 @@ void runTests(SendPort ping, Queue checks) { uint16[0] = 0; uint16[1] = 1; ByteBuffer byteBuffer = uint16.buffer; - ping.send(byteBuffer); // //# byteBuffer: ok - checks.add( // //# byteBuffer: ok + ping.send(byteBuffer); // /// byteBuffer: ok + checks.add( // /// byteBuffer: ok (x) { Expect.isTrue(x is ByteBuffer); Uint16List uint16View = new Uint16List.view(x); @@ -181,14 +181,14 @@ void runTests(SendPort ping, Queue checks) { Expect.equals(0, uint16View[0]); Expect.equals(1, uint16View[1]); } - ) // //# byteBuffer: ok + ) // /// byteBuffer: ok ; Int32x4List list32x4 = new Int32x4List(2); list32x4[0] = new Int32x4(1, 2, 3, 4); list32x4[1] = new Int32x4(5, 6, 7, 8); - ping.send(list32x4); // //# int32x4: ok - checks.add( // //# int32x4: ok + ping.send(list32x4); // /// int32x4: ok + checks.add( // /// int32x4: ok (x) { Expect.isTrue(x is Int32x4List); Expect.equals(2, x.length); @@ -203,7 +203,7 @@ void runTests(SendPort ping, Queue checks) { Expect.equals(7, entry2.z); Expect.equals(8, entry2.w); } - ) // //# int32x4: ok + ) // /// int32x4: ok ; ping.send({"foo": 499, "bar": 32}); @@ -277,7 +277,7 @@ void runTests(SendPort ping, Queue checks) { print(x.length); Expect.equals(1, x.length); Expect.equals(499, x['foo']); - Expect.identical(constMap, x); // //# constMap: ok + Expect.identical(constMap, x); // /// constMap: ok Expect.throws(() => constMap['bar'] = 42); }); @@ -352,17 +352,17 @@ void runTests(SendPort ping, Queue checks) { Expect.throws(() => x.field2 = 22); }); - ping.send(new E(E.fooFun)); // //# fun: ok - checks.add((x) { // //# fun: continued - Expect.equals(E.fooFun, x.fun); // //# fun: continued - Expect.equals(499, x.fun()); // //# fun: continued - }); // //# fun: continued + ping.send(new E(E.fooFun)); // /// fun: ok + checks.add((x) { // /// fun: continued + Expect.equals(E.fooFun, x.fun); // /// fun: continued + Expect.equals(499, x.fun()); // /// fun: continued + }); // /// fun: continued - ping.send(new E(barFun)); // //# fun: continued - checks.add((x) { // //# fun: continued - Expect.equals(barFun, x.fun); // //# fun: continued - Expect.equals(42, x.fun()); // //# fun: continued - }); // //# fun: continued + ping.send(new E(barFun)); // /// fun: continued + checks.add((x) { // /// fun: continued + Expect.equals(barFun, x.fun); // /// fun: continued + Expect.equals(42, x.fun()); // /// fun: continued + }); // /// fun: continued Expect.throws(() => ping.send(new E(new E(null).instanceFun))); @@ -377,7 +377,7 @@ void runTests(SendPort ping, Queue checks) { ping.send(constF); checks.add((x) { Expect.equals("field", x.field); - Expect.identical(constF, x); // //# constInstance: ok + Expect.identical(constF, x); // /// constInstance: ok }); G g1 = new G(nonConstF); @@ -399,14 +399,14 @@ void runTests(SendPort ping, Queue checks) { Expect.isFalse(identical(g1, x)); F f = x.field; Expect.equals("field", f.field); - Expect.identical(constF, f); // //# constInstance: continued + Expect.identical(constF, f); // /// constInstance: continued }); checks.add((x) { // g3. Expect.isTrue(x is G); - Expect.identical(g3, x); // //# constInstance: continued + Expect.identical(g3, x); // /// constInstance: continued F f = x.field; Expect.equals("field", f.field); - Expect.identical(constF, f); // //# constInstance: continued + Expect.identical(constF, f); // /// constInstance: continued }); // Make sure objects in a map are serialized and deserialized in the correct diff --git a/tests/isolate/simple_message_test.dart b/tests/isolate/simple_message_test.dart index 98b19e16eee..a7454a00362 100644 --- a/tests/isolate/simple_message_test.dart +++ b/tests/isolate/simple_message_test.dart @@ -11,7 +11,7 @@ import "package:async_helper/async_helper.dart"; void entry(SendPort replyTo) { var message = "foo"; - message = "bar"; // //# 01: runtime error + message = "bar"; // /// 01: runtime error replyTo.send(message); } diff --git a/tests/isolate/spawn_uri_multi_test.dart b/tests/isolate/spawn_uri_multi_test.dart index 4610d2aaa68..feb3cacba5e 100644 --- a/tests/isolate/spawn_uri_multi_test.dart +++ b/tests/isolate/spawn_uri_multi_test.dart @@ -20,7 +20,7 @@ main() { port.first.then(expectAsync((msg) { String expectedMessage = 're: hi'; // Should be hi, not hello. - expectedMessage = 're: hello'; //# 01: runtime error + expectedMessage = 're: hello'; /// 01: runtime error expect(msg, equals(expectedMessage)); })); diff --git a/tests/language/abstract_exact_selector_test.dart b/tests/language/abstract_exact_selector_test.dart index fa4e48b365c..8932dc31906 100644 --- a/tests/language/abstract_exact_selector_test.dart +++ b/tests/language/abstract_exact_selector_test.dart @@ -8,7 +8,7 @@ import "package:expect/expect.dart"; import "compiler_annotations.dart"; -abstract //# 01: static type warning +abstract /// 01: static type warning class Foo { noSuchMethod(im) => 42; } diff --git a/tests/language/abstract_factory_constructor_test.dart b/tests/language/abstract_factory_constructor_test.dart index aacfee0079e..50e7965c2b2 100644 --- a/tests/language/abstract_factory_constructor_test.dart +++ b/tests/language/abstract_factory_constructor_test.dart @@ -19,11 +19,11 @@ abstract class A1 { class A2 { // Intentionally abstract method. - method(); // //# 00: static type warning + method(); // /// 00: static type warning A2.make() {} } main() { new A1.make(); - new A2.make(); //# 00: continued + new A2.make(); /// 00: continued } diff --git a/tests/language/abstract_getter_test.dart b/tests/language/abstract_getter_test.dart index 32174f2b016..964cf80609a 100644 --- a/tests/language/abstract_getter_test.dart +++ b/tests/language/abstract_getter_test.dart @@ -8,7 +8,7 @@ import "package:expect/expect.dart"; class Foo { // Intentionally abstract: - get i; // //# 01: static type warning + get i; // /// 01: static type warning } class Bar { @@ -17,9 +17,9 @@ class Bar { noMethod(e) => e is NoSuchMethodError; checkIt(f) { - Expect.throws(() { f.i = 'hi'; }, noMethod); // //# 01: continued - Expect.throws(() { print(f.i); }, noMethod); // //# 01: continued - Expect.throws(() { print(f.i()); }, noMethod); // //# 01: continued + Expect.throws(() { f.i = 'hi'; }, noMethod); // /// 01: continued + Expect.throws(() { print(f.i); }, noMethod); // /// 01: continued + Expect.throws(() { print(f.i()); }, noMethod); // /// 01: continued } main() { diff --git a/tests/language/abstract_runtime_error_test.dart b/tests/language/abstract_runtime_error_test.dart index 556f9ffeb4a..97f71ef6af5 100644 --- a/tests/language/abstract_runtime_error_test.dart +++ b/tests/language/abstract_runtime_error_test.dart @@ -12,7 +12,7 @@ import "package:expect/expect.dart"; abstract class Interface { - void foo(); //# 03: static type warning + void foo(); /// 03: static type warning } abstract class AbstractClass { @@ -27,19 +27,19 @@ class NonAbstractClass implements Interface { toString() => 'NonAbstractClass'; } -Interface interface() => new Interface(); //# 01: static type warning +Interface interface() => new Interface(); /// 01: static type warning -AbstractClass abstractClass() => new AbstractClass(); //# 02: static type warning +AbstractClass abstractClass() => new AbstractClass(); /// 02: static type warning bool isAbstractClassInstantiationError(e) { return e is AbstractClassInstantiationError; } void main() { - Expect.throws(interface, isAbstractClassInstantiationError, // //# 01: continued - "expected AbstractClassInstantiationError"); // //# 01: continued - Expect.throws(abstractClass, isAbstractClassInstantiationError, // //# 02: continued - "expected AbstractClassInstantiationError"); // //# 02: continued + Expect.throws(interface, isAbstractClassInstantiationError, // /// 01: continued + "expected AbstractClassInstantiationError"); // /// 01: continued + Expect.throws(abstractClass, isAbstractClassInstantiationError, // /// 02: continued + "expected AbstractClassInstantiationError"); // /// 02: continued Expect.stringEquals('ConcreteSubclass', '${new ConcreteSubclass()}'); Expect.stringEquals('NonAbstractClass', '${new NonAbstractClass()}'); } diff --git a/tests/language/abstract_syntax_test.dart b/tests/language/abstract_syntax_test.dart index dda5c64985f..f949ff320b2 100644 --- a/tests/language/abstract_syntax_test.dart +++ b/tests/language/abstract_syntax_test.dart @@ -10,8 +10,8 @@ main() { } class A { - foo(); // //# 00: static type warning - static bar(); // //# 01: compile-time error + foo(); // /// 00: static type warning + static bar(); // /// 01: compile-time error } class B extends A { diff --git a/tests/language/arg_param_trailing_comma_test.dart b/tests/language/arg_param_trailing_comma_test.dart index 19ff8eba240..6d1a121795f 100644 --- a/tests/language/arg_param_trailing_comma_test.dart +++ b/tests/language/arg_param_trailing_comma_test.dart @@ -12,551 +12,551 @@ var z = 42; // Trailing comma in parameter litss. // Typedefs. -typedef fx(x, ); // //# none: ok -typedef fy([y,]); // //# none: continued -typedef fxy(x, [y, ]); // //# none: continued -typedef fz({z,}); // //# none: continued -typedef fxz(x, {z, }); // //# none: continued +typedef fx(x, ); // /// none: ok +typedef fy([y,]); // /// none: continued +typedef fxy(x, [y, ]); // /// none: continued +typedef fz({z,}); // /// none: continued +typedef fxz(x, {z, }); // /// none: continued // As arguments type. -argfx(void f(x, )) {} // //# none: continued -argfy(void f([y, ])) {} // //# none: continued -argfxy(void f(x, [y, ])) {} // //# none: continued -argfz(void f({z, })) {} // //# none: continued -argfxz(void f(x, {z, })) {} // //# none: continued +argfx(void f(x, )) {} // /// none: continued +argfy(void f([y, ])) {} // /// none: continued +argfxy(void f(x, [y, ])) {} // /// none: continued +argfz(void f({z, })) {} // /// none: continued +argfxz(void f(x, {z, })) {} // /// none: continued // Top level functions -void topx(x,) {} // //# none: continued -void topy([y, ]) {} // //# none: continued -void topxy(x, [y, ]) {} // //# none: continued -void topz({z, }) {} // //# none: continued -void topxz(x, {z, }) {} // //# none: continued +void topx(x,) {} // /// none: continued +void topy([y, ]) {} // /// none: continued +void topxy(x, [y, ]) {} // /// none: continued +void topz({z, }) {} // /// none: continued +void topxz(x, {z, }) {} // /// none: continued -void set topsetx(x, ) {} // //# none: continued +void set topsetx(x, ) {} // /// none: continued // After specific parameter formats. -void afterDefaultValueY([int y = 42, ]) {} // //# none: continued -void afterDefaultValueZ({int z : 42, }) {} // //# none: continued -void afterFunsigX(void f(),) {} // //# none: continued -void afterFunsigY([void f(),]) {} // //# none: continued -void afterFunsigZ({void f(),}) {} // //# none: continued -void afterFunsigDefaultValueY([void f() = topy,]) {} // //# none: continued -void afterFunsigDefaultValueZ({void f() : topz,}) {} // //# none: continued +void afterDefaultValueY([int y = 42, ]) {} // /// none: continued +void afterDefaultValueZ({int z : 42, }) {} // /// none: continued +void afterFunsigX(void f(),) {} // /// none: continued +void afterFunsigY([void f(),]) {} // /// none: continued +void afterFunsigZ({void f(),}) {} // /// none: continued +void afterFunsigDefaultValueY([void f() = topy,]) {} // /// none: continued +void afterFunsigDefaultValueZ({void f() : topz,}) {} // /// none: continued class C { C(); // Constructors. - C.x(x, ); // //# none: continued - C.y([y, ]); // //# none: continued - C.xy(x, [y, ]); // //# none: continued - C.z({z, }); // //# none: continued - C.xz(x, {z, }); // //# none: continued + C.x(x, ); // /// none: continued + C.y([y, ]); // /// none: continued + C.xy(x, [y, ]); // /// none: continued + C.z({z, }); // /// none: continued + C.xz(x, {z, }); // /// none: continued // Static members - static void staticx(x,) {} // //# none: continued - static void staticy([y, ]) {} // //# none: continued - static void staticxy(x, [y, ]) {} // //# none: continued - static void staticz({z, }) {} // //# none: continued - static void staticxz(x, {z, }) {} // //# none: continued + static void staticx(x,) {} // /// none: continued + static void staticy([y, ]) {} // /// none: continued + static void staticxy(x, [y, ]) {} // /// none: continued + static void staticz({z, }) {} // /// none: continued + static void staticxz(x, {z, }) {} // /// none: continued - static void set staticsetx(x, ) {} // //# none: continued + static void set staticsetx(x, ) {} // /// none: continued // Instance members - void instancex(x,) {} // //# none: continued - void instancey([y, ]) {} // //# none: continued - void instancexy(x, [y, ]) {} // //# none: continued - void instancez({z, }) {} // //# none: continued - void instancexz(x, {z, }) {} // //# none: continued + void instancex(x,) {} // /// none: continued + void instancey([y, ]) {} // /// none: continued + void instancexy(x, [y, ]) {} // /// none: continued + void instancez({z, }) {} // /// none: continued + void instancexz(x, {z, }) {} // /// none: continued - void set instancesetx(x, ) {} // //# none: continued + void set instancesetx(x, ) {} // /// none: continued - operator +(x, ) => this; // //# none: continued - operator []=(x, y, ) {} // //# none: continued + operator +(x, ) => this; // /// none: continued + operator []=(x, y, ) {} // /// none: continued } main() { - testCalls(); // //# none: continued + testCalls(); // /// none: continued // Make sure the cases are checked. testBadCalls(); } void testCalls() { // Check that all functions can be called normally - topx(x); // //# none: continued - topy(y); // //# none: continued - topxy(x, y); // //# none: continued - topz(); // //# none: continued - topz(z: z); // //# none: continued - topxz(x); // //# none: continued - topxz(x, z: z); // //# none: continued - topsetx = x; // //# none: continued - afterDefaultValueY(); // //# none: continued - afterDefaultValueY(y); // //# none: continued - afterDefaultValueZ(); // //# none: continued - afterDefaultValueZ(z: z); // //# none: continued - new C.x(x); // //# none: continued - new C.xy(x); // //# none: continued - new C.xy(x, y); // //# none: continued - new C.y(y); // //# none: continued - new C.xz(x); // //# none: continued - new C.xz(x, z: z); // //# none: continued - new C.z(z: z); // //# none: continued - C.staticx(x); // //# none: continued - C.staticy(y); // //# none: continued - C.staticxy(x); // //# none: continued - C.staticxy(x, y); // //# none: continued - C.staticz(); // //# none: continued - C.staticz(z: z); // //# none: continued - C.staticxz(x); // //# none: continued - C.staticxz(x, z: z); // //# none: continued - C.staticsetx = x; // //# none: continued - c.instancex(x); // //# none: continued - c.instancey(); // //# none: continued - c.instancey(y); // //# none: continued - c.instancexy(x); // //# none: continued - c.instancexy(x, y); // //# none: continued - c.instancez(); // //# none: continued - c.instancez(z: z); // //# none: continued - c.instancexz(x); // //# none: continued - c.instancexz(x, z: z); // //# none: continued - c.instancesetx = x; // //# none: continued - c + x; // //# none: continued - c[x] = y; // //# none: continued + topx(x); // /// none: continued + topy(y); // /// none: continued + topxy(x, y); // /// none: continued + topz(); // /// none: continued + topz(z: z); // /// none: continued + topxz(x); // /// none: continued + topxz(x, z: z); // /// none: continued + topsetx = x; // /// none: continued + afterDefaultValueY(); // /// none: continued + afterDefaultValueY(y); // /// none: continued + afterDefaultValueZ(); // /// none: continued + afterDefaultValueZ(z: z); // /// none: continued + new C.x(x); // /// none: continued + new C.xy(x); // /// none: continued + new C.xy(x, y); // /// none: continued + new C.y(y); // /// none: continued + new C.xz(x); // /// none: continued + new C.xz(x, z: z); // /// none: continued + new C.z(z: z); // /// none: continued + C.staticx(x); // /// none: continued + C.staticy(y); // /// none: continued + C.staticxy(x); // /// none: continued + C.staticxy(x, y); // /// none: continued + C.staticz(); // /// none: continued + C.staticz(z: z); // /// none: continued + C.staticxz(x); // /// none: continued + C.staticxz(x, z: z); // /// none: continued + C.staticsetx = x; // /// none: continued + c.instancex(x); // /// none: continued + c.instancey(); // /// none: continued + c.instancey(y); // /// none: continued + c.instancexy(x); // /// none: continued + c.instancexy(x, y); // /// none: continued + c.instancez(); // /// none: continued + c.instancez(z: z); // /// none: continued + c.instancexz(x); // /// none: continued + c.instancexz(x, z: z); // /// none: continued + c.instancesetx = x; // /// none: continued + c + x; // /// none: continued + c[x] = y; // /// none: continued // Call with extra comma (not possible for setters and operators). - topx(x, ); // //# none: continued - topy(y, ); // //# none: continued - topxy(x, y, ); // //# none: continued - topxy(x, ); // //# none: continued - topz(z: z, ); // //# none: continued - topxz(x, ); // //# none: continued - topxz(x, z: z, ); // //# none: continued - new C.x(x, ); // //# none: continued - new C.xy(x, y, ); // //# none: continued - new C.xy(x, ); // //# none: continued - new C.y(y, ); // //# none: continued - new C.xz(x, ); // //# none: continued - new C.xz(x, z: z, ); // //# none: continued - new C.z(z: z, ); // //# none: continued - C.staticx(x, ); // //# none: continued - C.staticy(y, ); // //# none: continued - C.staticxy(x, y, ); // //# none: continued - C.staticxy(x, ); // //# none: continued - C.staticz(z: z, ); // //# none: continued - C.staticxz(x, ); // //# none: continued - C.staticxz(x, z: z, ); // //# none: continued - c.instancex(x, ); // //# none: continued - c.instancey(y, ); // //# none: continued - c.instancexy(x, y, ); // //# none: continued - c.instancexy(x, ); // //# none: continued - c.instancez(z: z, ); // //# none: continued - c.instancexz(x, ); // //# none: continued - c.instancexz(x, z: z, ); // //# none: continued + topx(x, ); // /// none: continued + topy(y, ); // /// none: continued + topxy(x, y, ); // /// none: continued + topxy(x, ); // /// none: continued + topz(z: z, ); // /// none: continued + topxz(x, ); // /// none: continued + topxz(x, z: z, ); // /// none: continued + new C.x(x, ); // /// none: continued + new C.xy(x, y, ); // /// none: continued + new C.xy(x, ); // /// none: continued + new C.y(y, ); // /// none: continued + new C.xz(x, ); // /// none: continued + new C.xz(x, z: z, ); // /// none: continued + new C.z(z: z, ); // /// none: continued + C.staticx(x, ); // /// none: continued + C.staticy(y, ); // /// none: continued + C.staticxy(x, y, ); // /// none: continued + C.staticxy(x, ); // /// none: continued + C.staticz(z: z, ); // /// none: continued + C.staticxz(x, ); // /// none: continued + C.staticxz(x, z: z, ); // /// none: continued + c.instancex(x, ); // /// none: continued + c.instancey(y, ); // /// none: continued + c.instancexy(x, y, ); // /// none: continued + c.instancexy(x, ); // /// none: continued + c.instancez(z: z, ); // /// none: continued + c.instancexz(x, ); // /// none: continued + c.instancexz(x, z: z, ); // /// none: continued // Typedefs work as expected. - if (topx is! fx) throw "Bad type: $fx"; // //# none: continued - if (topy is! fy) throw "Bad type: $fy"; // //# none: continued - if (topxy is! fxy) throw "Bad type: $fxy"; // //# none: continued - if (topz is! fz) throw "Bad type: $fz"; // //# none: continued - if (topxz is! fxz) throw "Bad type: $fxz"; // //# none: continued + if (topx is! fx) throw "Bad type: $fx"; // /// none: continued + if (topy is! fy) throw "Bad type: $fy"; // /// none: continued + if (topxy is! fxy) throw "Bad type: $fxy"; // /// none: continued + if (topz is! fz) throw "Bad type: $fz"; // /// none: continued + if (topxz is! fxz) throw "Bad type: $fxz"; // /// none: continued // Parameter types work (checked mode only test). - argfx(topx); // //# none: continued - argfy(topy); // //# none: continued - argfxy(topxy); // //# none: continued - argfz(topz); // //# none: continued - argfxz(topxz); // //# none: continued + argfx(topx); // /// none: continued + argfy(topy); // /// none: continued + argfxy(topxy); // /// none: continued + argfz(topz); // /// none: continued + argfxz(topxz); // /// none: continued } // Invalid syntax. This was invalid syntax before the addition of trailing // commas too, and should stay that way. -void topBadEmpty(,) {} // //# 1: compile-time error -void topBadStart(, a) {} // //# 2: compile-time error -void topBadEnd(a,,) {} // //# 3: compile-time error -void topBadMiddle(a,, b) {} // //# 4: compile-time error -void topBadPosEmpty([]) {} // //# 5: compile-time error -void topBadPosEmpty(,[]) {} // //# 6: compile-time error -void topBadPosEmpty([,]) {} // //# 7: compile-time error -void topBadPosEmpty([],) {} // //# 8: compile-time error -void topBadPosStart(,[a]) {} // //# 9: compile-time error -void topBadPosStart([, a]) {} // //# 10: compile-time error -void topBadPosEnd([a,,]) {} // //# 11: compile-time error -void topBadPosStart([a],) {} // //# 12: compile-time error -void topBadPosMiddle([a,, b]) {} // //# 13: compile-time error -void topBadNamEmpty({}) {} // //# 14: compile-time error -void topBadNamEmpty(,{}) {} // //# 15: compile-time error -void topBadNamEmpty({,}) {} // //# 16: compile-time error -void topBadNamEmpty({},) {} // //# 17: compile-time error -void topBadNamStart(,{a}) {} // //# 18: compile-time error -void topBadNamStart({, a}) {} // //# 19: compile-time error -void topBadNamEnd({a,,}) {} // //# 20: compile-time error -void topBadNamStart({a},) {} // //# 21: compile-time error -void topBadNamMiddle({a,, b}) {} // //# 22: compile-time error -void set topSetBadEmpty(,) {} // //# 23: compile-time error -void set topSetBadStart(, a) {} // //# 24: compile-time error -void set topSetBadEnd(a,,) {} // //# 25: compile-time error -void set topSetBadMiddle(a,, b) {} // //# 26: compile-time error +void topBadEmpty(,) {} // /// 1: compile-time error +void topBadStart(, a) {} // /// 2: compile-time error +void topBadEnd(a,,) {} // /// 3: compile-time error +void topBadMiddle(a,, b) {} // /// 4: compile-time error +void topBadPosEmpty([]) {} // /// 5: compile-time error +void topBadPosEmpty(,[]) {} // /// 6: compile-time error +void topBadPosEmpty([,]) {} // /// 7: compile-time error +void topBadPosEmpty([],) {} // /// 8: compile-time error +void topBadPosStart(,[a]) {} // /// 9: compile-time error +void topBadPosStart([, a]) {} // /// 10: compile-time error +void topBadPosEnd([a,,]) {} // /// 11: compile-time error +void topBadPosStart([a],) {} // /// 12: compile-time error +void topBadPosMiddle([a,, b]) {} // /// 13: compile-time error +void topBadNamEmpty({}) {} // /// 14: compile-time error +void topBadNamEmpty(,{}) {} // /// 15: compile-time error +void topBadNamEmpty({,}) {} // /// 16: compile-time error +void topBadNamEmpty({},) {} // /// 17: compile-time error +void topBadNamStart(,{a}) {} // /// 18: compile-time error +void topBadNamStart({, a}) {} // /// 19: compile-time error +void topBadNamEnd({a,,}) {} // /// 20: compile-time error +void topBadNamStart({a},) {} // /// 21: compile-time error +void topBadNamMiddle({a,, b}) {} // /// 22: compile-time error +void set topSetBadEmpty(,) {} // /// 23: compile-time error +void set topSetBadStart(, a) {} // /// 24: compile-time error +void set topSetBadEnd(a,,) {} // /// 25: compile-time error +void set topSetBadMiddle(a,, b) {} // /// 26: compile-time error class Bad { Bad() {} - Bad.empty(,) {} // //# 27: compile-time error - Bad.start(, a) {} // //# 28: compile-time error - Bad.end(a,,) {} // //# 29: compile-time error - Bad.middle(a,, b) {} // //# 30: compile-time error - Bad.posEmpty([]) {} // //# 31: compile-time error - Bad.posEmpty(,[]) {} // //# 32: compile-time error - Bad.posEmpty([,]) {} // //# 33: compile-time error - Bad.posEmpty([],) {} // //# 34: compile-time error - Bad.posStart(,[a]) {} // //# 35: compile-time error - Bad.posStart([, a]) {} // //# 36: compile-time error - Bad.posEnd([a,,]) {} // //# 37: compile-time error - Bad.posStart([a],) {} // //# 38: compile-time error - Bad.PosMiddle([a,, b]) {} // //# 39: compile-time error - Bad.namEmpty({}) {} // //# 40: compile-time error - Bad.namEmpty(,{}) {} // //# 41: compile-time error - Bad.namEmpty({,}) {} // //# 42: compile-time error - Bad.namEmpty({},) {} // //# 43: compile-time error - Bad.namStart(,{a}) {} // //# 44: compile-time error - Bad.namStart({, a}) {} // //# 45: compile-time error - Bad.namEnd({a,,}) {} // //# 46: compile-time error - Bad.namStart({a},) {} // //# 47: compile-time error - Bad.namMiddle({a,, b}) {} // //# 48: compile-time error - static void staticBadEmpty(,) {} // //# 49: compile-time error - static void staticBadStart(, a) {} // //# 50: compile-time error - static void staticBadEnd(a,,) {} // //# 51: compile-time error - static void staticBadMiddle(a,, b) {} // //# 52: compile-time error - static void staticBadPosEmpty([]) {} // //# 53: compile-time error - static void staticBadPosEmpty(,[]) {} // //# 54: compile-time error - static void staticBadPosEmpty([,]) {} // //# 55: compile-time error - static void staticBadPosEmpty([],) {} // //# 56: compile-time error - static void staticBadPosStart(,[a]) {} // //# 57: compile-time error - static void staticBadPosStart([, a]) {} // //# 58: compile-time error - static void staticBadPosEnd([a,,]) {} // //# 59: compile-time error - static void staticBadPosStart([a],) {} // //# 60: compile-time error - static void staticBadPosMiddle([a,, b]) {} // //# 61: compile-time error - static void staticBadNamEmpty({}) {} // //# 62: compile-time error - static void staticBadNamEmpty(,{}) {} // //# 63: compile-time error - static void staticBadNamEmpty({,}) {} // //# 64: compile-time error - static void staticBadNamEmpty({},) {} // //# 65: compile-time error - static void staticBadNamStart(,{a}) {} // //# 66: compile-time error - static void staticBadNamStart({, a}) {} // //# 67: compile-time error - static void staticBadNamEnd({a,,}) {} // //# 68: compile-time error - static void staticBadNamStart({a},) {} // //# 69: compile-time error - static void staticBadNamMiddle({a,, b}) {} // //# 70: compile-time error - static void set staticSetBadEmpty(,) {} // //# 71: compile-time error - static void set staticSetBadStart(, a) {} // //# 72: compile-time error - static void set staticSetBadEnd(a,,) {} // //# 73: compile-time error - static void set staticSetBadMiddle(a,, b) {} // //# 74: compile-time error - void instanceBadEmpty(,) {} // //# 75: compile-time error - void instanceBadStart(, a) {} // //# 76: compile-time error - void instanceBadEnd(a,,) {} // //# 77: compile-time error - void instanceBadMiddle(a,, b) {} // //# 78: compile-time error - void instanceBadPosEmpty([]) {} // //# 79: compile-time error - void instanceBadPosEmpty(,[]) {} // //# 80: compile-time error - void instanceBadPosEmpty([,]) {} // //# 81: compile-time error - void instanceBadPosEmpty([],) {} // //# 82: compile-time error - void instanceBadPosStart(,[a]) {} // //# 83: compile-time error - void instanceBadPosStart([, a]) {} // //# 84: compile-time error - void instanceBadPosEnd([a,,]) {} // //# 85: compile-time error - void instanceBadPosStart([a],) {} // //# 86: compile-time error - void instanceBadPosMiddle([a,, b]) {} // //# 87: compile-time error - void instanceBadNamEmpty({}) {} // //# 88: compile-time error - void instanceBadNamEmpty(,{}) {} // //# 89: compile-time error - void instanceBadNamEmpty({,}) {} // //# 90: compile-time error - void instanceBadNamEmpty({},) {} // //# 91: compile-time error - void instanceBadNamStart(,{a}) {} // //# 92: compile-time error - void instanceBadNamStart({, a}) {} // //# 93: compile-time error - void instanceBadNamEnd({a,,}) {} // //# 94: compile-time error - void instanceBadNamStart({a},) {} // //# 95: compile-time error - void instanceBadNamMiddle({a,, b}) {} // //# 96: compile-time error - void set instanceSetBadEmpty(,) {} // //# 97: compile-time error - void set instanceSetBadStart(, a) {} // //# 98: compile-time error - void set instanceSetBadEnd(a,,) {} // //# 99: compile-time error - void set instanceSetBadMiddle(a,, b) {} // //# 100: compile-time error - void operator *(,); // //# 101: compile-time error - void operator *(, a); // //# 102: compile-time error - void operator *(a,,); // //# 103: compile-time error - void operator []=(, a); // //# 104: compile-time error - void operator []=(a,,); // //# 105: compile-time error - void operator []=(a,, b); // //# 106: compile-time error - void operator []=(a,); // //# 107: compile-time error + Bad.empty(,) {} // /// 27: compile-time error + Bad.start(, a) {} // /// 28: compile-time error + Bad.end(a,,) {} // /// 29: compile-time error + Bad.middle(a,, b) {} // /// 30: compile-time error + Bad.posEmpty([]) {} // /// 31: compile-time error + Bad.posEmpty(,[]) {} // /// 32: compile-time error + Bad.posEmpty([,]) {} // /// 33: compile-time error + Bad.posEmpty([],) {} // /// 34: compile-time error + Bad.posStart(,[a]) {} // /// 35: compile-time error + Bad.posStart([, a]) {} // /// 36: compile-time error + Bad.posEnd([a,,]) {} // /// 37: compile-time error + Bad.posStart([a],) {} // /// 38: compile-time error + Bad.PosMiddle([a,, b]) {} // /// 39: compile-time error + Bad.namEmpty({}) {} // /// 40: compile-time error + Bad.namEmpty(,{}) {} // /// 41: compile-time error + Bad.namEmpty({,}) {} // /// 42: compile-time error + Bad.namEmpty({},) {} // /// 43: compile-time error + Bad.namStart(,{a}) {} // /// 44: compile-time error + Bad.namStart({, a}) {} // /// 45: compile-time error + Bad.namEnd({a,,}) {} // /// 46: compile-time error + Bad.namStart({a},) {} // /// 47: compile-time error + Bad.namMiddle({a,, b}) {} // /// 48: compile-time error + static void staticBadEmpty(,) {} // /// 49: compile-time error + static void staticBadStart(, a) {} // /// 50: compile-time error + static void staticBadEnd(a,,) {} // /// 51: compile-time error + static void staticBadMiddle(a,, b) {} // /// 52: compile-time error + static void staticBadPosEmpty([]) {} // /// 53: compile-time error + static void staticBadPosEmpty(,[]) {} // /// 54: compile-time error + static void staticBadPosEmpty([,]) {} // /// 55: compile-time error + static void staticBadPosEmpty([],) {} // /// 56: compile-time error + static void staticBadPosStart(,[a]) {} // /// 57: compile-time error + static void staticBadPosStart([, a]) {} // /// 58: compile-time error + static void staticBadPosEnd([a,,]) {} // /// 59: compile-time error + static void staticBadPosStart([a],) {} // /// 60: compile-time error + static void staticBadPosMiddle([a,, b]) {} // /// 61: compile-time error + static void staticBadNamEmpty({}) {} // /// 62: compile-time error + static void staticBadNamEmpty(,{}) {} // /// 63: compile-time error + static void staticBadNamEmpty({,}) {} // /// 64: compile-time error + static void staticBadNamEmpty({},) {} // /// 65: compile-time error + static void staticBadNamStart(,{a}) {} // /// 66: compile-time error + static void staticBadNamStart({, a}) {} // /// 67: compile-time error + static void staticBadNamEnd({a,,}) {} // /// 68: compile-time error + static void staticBadNamStart({a},) {} // /// 69: compile-time error + static void staticBadNamMiddle({a,, b}) {} // /// 70: compile-time error + static void set staticSetBadEmpty(,) {} // /// 71: compile-time error + static void set staticSetBadStart(, a) {} // /// 72: compile-time error + static void set staticSetBadEnd(a,,) {} // /// 73: compile-time error + static void set staticSetBadMiddle(a,, b) {} // /// 74: compile-time error + void instanceBadEmpty(,) {} // /// 75: compile-time error + void instanceBadStart(, a) {} // /// 76: compile-time error + void instanceBadEnd(a,,) {} // /// 77: compile-time error + void instanceBadMiddle(a,, b) {} // /// 78: compile-time error + void instanceBadPosEmpty([]) {} // /// 79: compile-time error + void instanceBadPosEmpty(,[]) {} // /// 80: compile-time error + void instanceBadPosEmpty([,]) {} // /// 81: compile-time error + void instanceBadPosEmpty([],) {} // /// 82: compile-time error + void instanceBadPosStart(,[a]) {} // /// 83: compile-time error + void instanceBadPosStart([, a]) {} // /// 84: compile-time error + void instanceBadPosEnd([a,,]) {} // /// 85: compile-time error + void instanceBadPosStart([a],) {} // /// 86: compile-time error + void instanceBadPosMiddle([a,, b]) {} // /// 87: compile-time error + void instanceBadNamEmpty({}) {} // /// 88: compile-time error + void instanceBadNamEmpty(,{}) {} // /// 89: compile-time error + void instanceBadNamEmpty({,}) {} // /// 90: compile-time error + void instanceBadNamEmpty({},) {} // /// 91: compile-time error + void instanceBadNamStart(,{a}) {} // /// 92: compile-time error + void instanceBadNamStart({, a}) {} // /// 93: compile-time error + void instanceBadNamEnd({a,,}) {} // /// 94: compile-time error + void instanceBadNamStart({a},) {} // /// 95: compile-time error + void instanceBadNamMiddle({a,, b}) {} // /// 96: compile-time error + void set instanceSetBadEmpty(,) {} // /// 97: compile-time error + void set instanceSetBadStart(, a) {} // /// 98: compile-time error + void set instanceSetBadEnd(a,,) {} // /// 99: compile-time error + void set instanceSetBadMiddle(a,, b) {} // /// 100: compile-time error + void operator *(,); // /// 101: compile-time error + void operator *(, a); // /// 102: compile-time error + void operator *(a,,); // /// 103: compile-time error + void operator []=(, a); // /// 104: compile-time error + void operator []=(a,,); // /// 105: compile-time error + void operator []=(a,, b); // /// 106: compile-time error + void operator []=(a,); // /// 107: compile-time error method() { // Local methods. - void localBadEmpty(,) {} // //# 108: compile-time error - void localBadStart(, a) {} // //# 109: compile-time error - void localBadEnd(a,,) {} // //# 110: compile-time error - void localBadMiddle(a,, b) {} // //# 111: compile-time error - void localBadPosEmpty([]) {} // //# 112: compile-time error - void localBadPosEmpty(,[]) {} // //# 113: compile-time error - void localBadPosEmpty([,]) {} // //# 114: compile-time error - void localBadPosEmpty([],) {} // //# 115: compile-time error - void localBadPosStart(,[a]) {} // //# 116: compile-time error - void localBadPosStart([, a]) {} // //# 117: compile-time error - void localBadPosEnd([a,,]) {} // //# 118: compile-time error - void localBadPosStart([a],) {} // //# 119: compile-time error - void localBadPosMiddle([a,, b]) {} // //# 120: compile-time error - void localBadNamEmpty({}) {} // //# 121: compile-time error - void localBadNamEmpty(,{}) {} // //# 122: compile-time error - void localBadNamEmpty({,}) {} // //# 123: compile-time error - void localBadNamEmpty({},) {} // //# 124: compile-time error - void localBadNamStart(,{a}) {} // //# 125: compile-time error - void localBadNamStart({, a}) {} // //# 126: compile-time error - void localBadNamEnd({a,,}) {} // //# 127: compile-time error - void localBadNamStart({a},) {} // //# 128: compile-time error - void localBadNamMiddle({a,, b}) {} // //# 129: compile-time error + void localBadEmpty(,) {} // /// 108: compile-time error + void localBadStart(, a) {} // /// 109: compile-time error + void localBadEnd(a,,) {} // /// 110: compile-time error + void localBadMiddle(a,, b) {} // /// 111: compile-time error + void localBadPosEmpty([]) {} // /// 112: compile-time error + void localBadPosEmpty(,[]) {} // /// 113: compile-time error + void localBadPosEmpty([,]) {} // /// 114: compile-time error + void localBadPosEmpty([],) {} // /// 115: compile-time error + void localBadPosStart(,[a]) {} // /// 116: compile-time error + void localBadPosStart([, a]) {} // /// 117: compile-time error + void localBadPosEnd([a,,]) {} // /// 118: compile-time error + void localBadPosStart([a],) {} // /// 119: compile-time error + void localBadPosMiddle([a,, b]) {} // /// 120: compile-time error + void localBadNamEmpty({}) {} // /// 121: compile-time error + void localBadNamEmpty(,{}) {} // /// 122: compile-time error + void localBadNamEmpty({,}) {} // /// 123: compile-time error + void localBadNamEmpty({},) {} // /// 124: compile-time error + void localBadNamStart(,{a}) {} // /// 125: compile-time error + void localBadNamStart({, a}) {} // /// 126: compile-time error + void localBadNamEnd({a,,}) {} // /// 127: compile-time error + void localBadNamStart({a},) {} // /// 128: compile-time error + void localBadNamMiddle({a,, b}) {} // /// 129: compile-time error // invalid calls. - topx(,); // //# 130: compile-time error - topy(,); // //# 131: compile-time error - topz(,); // //# 132: compile-time error - topx(, x); // //# 133: compile-time error - topz(, z:z); // //# 134: compile-time error - topxy(x,, y); // //# 135: compile-time error - topxz(x,, z:z); // //# 136: compile-time error - topx(x,,); // //# 137: compile-time error - topz(z:z,,); // //# 138: compile-time error + topx(,); // /// 130: compile-time error + topy(,); // /// 131: compile-time error + topz(,); // /// 132: compile-time error + topx(, x); // /// 133: compile-time error + topz(, z:z); // /// 134: compile-time error + topxy(x,, y); // /// 135: compile-time error + topxz(x,, z:z); // /// 136: compile-time error + topx(x,,); // /// 137: compile-time error + topz(z:z,,); // /// 138: compile-time error - new C.x(,); // //# 139: compile-time error - new C.y(,); // //# 140: compile-time error - new C.z(,); // //# 141: compile-time error - new C.x(, x); // //# 142: compile-time error - new C.z(, z:z); // //# 143: compile-time error - new C.xy(x,, y); // //# 144: compile-time error - new C.xz(x,, z:z); // //# 145: compile-time error - new C.x(x,,); // //# 146: compile-time error - new C.z(z:z,,); // //# 147: compile-time error + new C.x(,); // /// 139: compile-time error + new C.y(,); // /// 140: compile-time error + new C.z(,); // /// 141: compile-time error + new C.x(, x); // /// 142: compile-time error + new C.z(, z:z); // /// 143: compile-time error + new C.xy(x,, y); // /// 144: compile-time error + new C.xz(x,, z:z); // /// 145: compile-time error + new C.x(x,,); // /// 146: compile-time error + new C.z(z:z,,); // /// 147: compile-time error - C.staticx(,); // //# 148: compile-time error - C.staticy(,); // //# 149: compile-time error - C.staticz(,); // //# 150: compile-time error - C.staticx(, x); // //# 151: compile-time error - C.staticz(, z:z); // //# 152: compile-time error - C.staticxy(x,, y); // //# 153: compile-time error - C.staticxz(x,, z:z); // //# 154: compile-time error - C.staticx(x,,); // //# 155: compile-time error - C.staticz(z:z,,); // //# 156: compile-time error + C.staticx(,); // /// 148: compile-time error + C.staticy(,); // /// 149: compile-time error + C.staticz(,); // /// 150: compile-time error + C.staticx(, x); // /// 151: compile-time error + C.staticz(, z:z); // /// 152: compile-time error + C.staticxy(x,, y); // /// 153: compile-time error + C.staticxz(x,, z:z); // /// 154: compile-time error + C.staticx(x,,); // /// 155: compile-time error + C.staticz(z:z,,); // /// 156: compile-time error - c.instancex(,); // //# 157: compile-time error - c.instancey(,); // //# 158: compile-time error - c.instancez(,); // //# 159: compile-time error - c.instancex(, x); // //# 160: compile-time error - c.instancez(, z:z); // //# 161: compile-time error - c.instancexy(x,, y); // //# 162: compile-time error - c.instancexz(x,, z:z); // //# 163: compile-time error - c.instancex(x,,); // //# 164: compile-time error - c.instancez(z:z,,); // //# 165: compile-time error + c.instancex(,); // /// 157: compile-time error + c.instancey(,); // /// 158: compile-time error + c.instancez(,); // /// 159: compile-time error + c.instancex(, x); // /// 160: compile-time error + c.instancez(, z:z); // /// 161: compile-time error + c.instancexy(x,, y); // /// 162: compile-time error + c.instancexz(x,, z:z); // /// 163: compile-time error + c.instancex(x,,); // /// 164: compile-time error + c.instancez(z:z,,); // /// 165: compile-time error - c[x,] = y; // //# 166: compile-time error + c[x,] = y; // /// 166: compile-time error } // As parameters: - void f(void topBadEmpty(,)) {} // //# 167: compile-time error - void f(void topBadStart(, a)) {} // //# 168: compile-time error - void f(void topBadEnd(a,,)) {} // //# 169: compile-time error - void f(void topBadMiddle(a,, b)) {} // //# 170: compile-time error - void f(void topBadPosEmpty([])) {} // //# 171: compile-time error - void f(void topBadPosEmpty(,[])) {} // //# 172: compile-time error - void f(void topBadPosEmpty([,])) {} // //# 173: compile-time error - void f(void topBadPosEmpty([],)) {} // //# 174: compile-time error - void f(void topBadPosStart(,[a])) {} // //# 175: compile-time error - void f(void topBadPosStart([, a])) {} // //# 176: compile-time error - void f(void topBadPosEnd([a,,])) {} // //# 177: compile-time error - void f(void topBadPosStart([a],)) {} // //# 178: compile-time error - void f(void topBadPosMiddle([a,, b])) {} // //# 179: compile-time error - void f(void topBadNamEmpty({})) {} // //# 180: compile-time error - void f(void topBadNamEmpty(,{})) {} // //# 181: compile-time error - void f(void topBadNamEmpty({,})) {} // //# 182: compile-time error - void f(void topBadNamEmpty({},)) {} // //# 183: compile-time error - void f(void topBadNamStart(,{a})) {} // //# 184: compile-time error - void f(void topBadNamStart({, a})) {} // //# 185: compile-time error - void f(void topBadNamEnd({a,,})) {} // //# 186: compile-time error - void f(void topBadNamStart({a},)) {} // //# 187: compile-time error - void f(void topBadNamMiddle({a,, b})) {} // //# 188: compile-time error + void f(void topBadEmpty(,)) {} // /// 167: compile-time error + void f(void topBadStart(, a)) {} // /// 168: compile-time error + void f(void topBadEnd(a,,)) {} // /// 169: compile-time error + void f(void topBadMiddle(a,, b)) {} // /// 170: compile-time error + void f(void topBadPosEmpty([])) {} // /// 171: compile-time error + void f(void topBadPosEmpty(,[])) {} // /// 172: compile-time error + void f(void topBadPosEmpty([,])) {} // /// 173: compile-time error + void f(void topBadPosEmpty([],)) {} // /// 174: compile-time error + void f(void topBadPosStart(,[a])) {} // /// 175: compile-time error + void f(void topBadPosStart([, a])) {} // /// 176: compile-time error + void f(void topBadPosEnd([a,,])) {} // /// 177: compile-time error + void f(void topBadPosStart([a],)) {} // /// 178: compile-time error + void f(void topBadPosMiddle([a,, b])) {} // /// 179: compile-time error + void f(void topBadNamEmpty({})) {} // /// 180: compile-time error + void f(void topBadNamEmpty(,{})) {} // /// 181: compile-time error + void f(void topBadNamEmpty({,})) {} // /// 182: compile-time error + void f(void topBadNamEmpty({},)) {} // /// 183: compile-time error + void f(void topBadNamStart(,{a})) {} // /// 184: compile-time error + void f(void topBadNamStart({, a})) {} // /// 185: compile-time error + void f(void topBadNamEnd({a,,})) {} // /// 186: compile-time error + void f(void topBadNamStart({a},)) {} // /// 187: compile-time error + void f(void topBadNamMiddle({a,, b})) {} // /// 188: compile-time error } // As typedefs -typedef void BadEmpty(,); // //# 189: compile-time error -typedef void BadStart(, a); // //# 190: compile-time error -typedef void BadEnd(a,,); // //# 191: compile-time error -typedef void BadMiddle(a,, b); // //# 192: compile-time error -typedef void BadPosEmpty([]); // //# 193: compile-time error -typedef void BadPosEmpty(,[]); // //# 194: compile-time error -typedef void BadPosEmpty([,]); // //# 195: compile-time error -typedef void BadPosEmpty([],); // //# 196: compile-time error -typedef void BadPosStart(,[a]); // //# 197: compile-time error -typedef void BadPosStart([, a]); // //# 198: compile-time error -typedef void BadPosEnd([a,,]); // //# 199: compile-time error -typedef void BadPosStart([a],); // //# 200: compile-time error -typedef void BadPosMiddle([a,, b]); // //# 201: compile-time error -typedef void BadNamEmpty({}); // //# 202: compile-time error -typedef void BadNamEmpty(,{}); // //# 203: compile-time error -typedef void BadNamEmpty({,}); // //# 204: compile-time error -typedef void BadNamEmpty({},); // //# 205: compile-time error -typedef void BadNamStart(,{a}); // //# 206: compile-time error -typedef void BadNamStart({, a}); // //# 207: compile-time error -typedef void BadNamEnd({a,,}); // //# 208: compile-time error -typedef void BadNamStart({a},); // //# 209: compile-time error -typedef void BadNamMiddle({a,, b}); // //# 210: compile-time error +typedef void BadEmpty(,); // /// 189: compile-time error +typedef void BadStart(, a); // /// 190: compile-time error +typedef void BadEnd(a,,); // /// 191: compile-time error +typedef void BadMiddle(a,, b); // /// 192: compile-time error +typedef void BadPosEmpty([]); // /// 193: compile-time error +typedef void BadPosEmpty(,[]); // /// 194: compile-time error +typedef void BadPosEmpty([,]); // /// 195: compile-time error +typedef void BadPosEmpty([],); // /// 196: compile-time error +typedef void BadPosStart(,[a]); // /// 197: compile-time error +typedef void BadPosStart([, a]); // /// 198: compile-time error +typedef void BadPosEnd([a,,]); // /// 199: compile-time error +typedef void BadPosStart([a],); // /// 200: compile-time error +typedef void BadPosMiddle([a,, b]); // /// 201: compile-time error +typedef void BadNamEmpty({}); // /// 202: compile-time error +typedef void BadNamEmpty(,{}); // /// 203: compile-time error +typedef void BadNamEmpty({,}); // /// 204: compile-time error +typedef void BadNamEmpty({},); // /// 205: compile-time error +typedef void BadNamStart(,{a}); // /// 206: compile-time error +typedef void BadNamStart({, a}); // /// 207: compile-time error +typedef void BadNamEnd({a,,}); // /// 208: compile-time error +typedef void BadNamStart({a},); // /// 209: compile-time error +typedef void BadNamMiddle({a,, b}); // /// 210: compile-time error void testBadCalls() { - topBadEmpty(); // //# 1: continued - topBadStart(); // //# 2: continued - topBadEnd(); // //# 3: continued - topBadMiddle(); // //# 4: continued - topBadPosEmpty(); // //# 5: continued - topBadPosEmpty(); // //# 6: continued - topBadPosEmpty(); // //# 7: continued - topBadPosEmpty(); // //# 8: continued - topBadPosStart(); // //# 9: continued - topBadPosStart(); // //# 10: continued - topBadPosEnd(); // //# 11: continued - topBadPosStart(); // //# 12: continued - topBadPosMiddle(); // //# 13: continued - topBadNamEmpty(); // //# 14: continued - topBadNamEmpty(); // //# 15: continued - topBadNamEmpty(); // //# 16: continued - topBadNamEmpty(); // //# 17: continued - topBadNamStart(); // //# 18: continued - topBadNamStart(); // //# 19: continued - topBadNamEnd(); // //# 20: continued - topBadNamStart(); // //# 21: continued - topBadNamMiddle(); // //# 22: continued - topSetBadEmpty = 1; // //# 23: continued - topSetBadStart = 1; // //# 24: continued - topSetBadEnd = 1; // //# 25: continued - topSetBadMiddle = 1; // //# 26: continued - new Bad.empty(); // //# 27: continued - new Bad.start(); // //# 28: continued - new Bad.end(); // //# 29: continued - new Bad.middle(); // //# 30: continued - new Bad.posEmpty(); // //# 31: continued - new Bad.posEmpty(); // //# 32: continued - new Bad.posEmpty(); // //# 33: continued - new Bad.posEmpty(); // //# 34: continued - new Bad.posStart(); // //# 35: continued - new Bad.posStart(); // //# 36: continued - new Bad.posEnd(); // //# 37: continued - new Bad.posStart(); // //# 38: continued - new Bad.PosMiddle(); // //# 39: continued - new Bad.namEmpty(); // //# 40: continued - new Bad.namEmpty(); // //# 41: continued - new Bad.namEmpty(); // //# 42: continued - new Bad.namEmpty(); // //# 43: continued - new Bad.namStart(); // //# 44: continued - new Bad.namStart(); // //# 45: continued - new Bad.namEnd(); // //# 46: continued - new Bad.namStart(); // //# 47: continued - new Bad.namMiddle(); // //# 48: continued - Bad.staticBadEmpty(); // //# 49: continued - Bad.staticBadStart(); // //# 50: continued - Bad.staticBadEnd(); // //# 51: continued - Bad.staticBadMiddle(); // //# 52: continued - Bad.staticBadPosEmpty(); // //# 53: continued - Bad.staticBadPosEmpty(); // //# 54: continued - Bad.staticBadPosEmpty(); // //# 55: continued - Bad.staticBadPosEmpty(); // //# 56: continued - Bad.staticBadPosStart(); // //# 57: continued - Bad.staticBadPosStart(); // //# 58: continued - Bad.staticBadPosEnd(); // //# 59: continued - Bad.staticBadPosStart(); // //# 60: continued - Bad.staticBadPosMiddle(); // //# 61: continued - Bad.staticBadNamEmpty(); // //# 62: continued - Bad.staticBadNamEmpty(); // //# 63: continued - Bad.staticBadNamEmpty(); // //# 64: continued - Bad.staticBadNamEmpty(); // //# 65: continued - Bad.staticBadNamStart(); // //# 66: continued - Bad.staticBadNamStart(); // //# 67: continued - Bad.staticBadNamEnd(); // //# 68: continued - Bad.staticBadNamStart(); // //# 69: continued - Bad.staticBadNamMiddle(); // //# 70: continued - Bad.staticSetBadEmpty = 1; // //# 71: continued - Bad.staticSetBadStart = 1; // //# 72: continued - Bad.staticSetBadEnd = 1; // //# 73: continued - Bad.staticSetBadMiddle = 1; // //# 74: continued + topBadEmpty(); // /// 1: continued + topBadStart(); // /// 2: continued + topBadEnd(); // /// 3: continued + topBadMiddle(); // /// 4: continued + topBadPosEmpty(); // /// 5: continued + topBadPosEmpty(); // /// 6: continued + topBadPosEmpty(); // /// 7: continued + topBadPosEmpty(); // /// 8: continued + topBadPosStart(); // /// 9: continued + topBadPosStart(); // /// 10: continued + topBadPosEnd(); // /// 11: continued + topBadPosStart(); // /// 12: continued + topBadPosMiddle(); // /// 13: continued + topBadNamEmpty(); // /// 14: continued + topBadNamEmpty(); // /// 15: continued + topBadNamEmpty(); // /// 16: continued + topBadNamEmpty(); // /// 17: continued + topBadNamStart(); // /// 18: continued + topBadNamStart(); // /// 19: continued + topBadNamEnd(); // /// 20: continued + topBadNamStart(); // /// 21: continued + topBadNamMiddle(); // /// 22: continued + topSetBadEmpty = 1; // /// 23: continued + topSetBadStart = 1; // /// 24: continued + topSetBadEnd = 1; // /// 25: continued + topSetBadMiddle = 1; // /// 26: continued + new Bad.empty(); // /// 27: continued + new Bad.start(); // /// 28: continued + new Bad.end(); // /// 29: continued + new Bad.middle(); // /// 30: continued + new Bad.posEmpty(); // /// 31: continued + new Bad.posEmpty(); // /// 32: continued + new Bad.posEmpty(); // /// 33: continued + new Bad.posEmpty(); // /// 34: continued + new Bad.posStart(); // /// 35: continued + new Bad.posStart(); // /// 36: continued + new Bad.posEnd(); // /// 37: continued + new Bad.posStart(); // /// 38: continued + new Bad.PosMiddle(); // /// 39: continued + new Bad.namEmpty(); // /// 40: continued + new Bad.namEmpty(); // /// 41: continued + new Bad.namEmpty(); // /// 42: continued + new Bad.namEmpty(); // /// 43: continued + new Bad.namStart(); // /// 44: continued + new Bad.namStart(); // /// 45: continued + new Bad.namEnd(); // /// 46: continued + new Bad.namStart(); // /// 47: continued + new Bad.namMiddle(); // /// 48: continued + Bad.staticBadEmpty(); // /// 49: continued + Bad.staticBadStart(); // /// 50: continued + Bad.staticBadEnd(); // /// 51: continued + Bad.staticBadMiddle(); // /// 52: continued + Bad.staticBadPosEmpty(); // /// 53: continued + Bad.staticBadPosEmpty(); // /// 54: continued + Bad.staticBadPosEmpty(); // /// 55: continued + Bad.staticBadPosEmpty(); // /// 56: continued + Bad.staticBadPosStart(); // /// 57: continued + Bad.staticBadPosStart(); // /// 58: continued + Bad.staticBadPosEnd(); // /// 59: continued + Bad.staticBadPosStart(); // /// 60: continued + Bad.staticBadPosMiddle(); // /// 61: continued + Bad.staticBadNamEmpty(); // /// 62: continued + Bad.staticBadNamEmpty(); // /// 63: continued + Bad.staticBadNamEmpty(); // /// 64: continued + Bad.staticBadNamEmpty(); // /// 65: continued + Bad.staticBadNamStart(); // /// 66: continued + Bad.staticBadNamStart(); // /// 67: continued + Bad.staticBadNamEnd(); // /// 68: continued + Bad.staticBadNamStart(); // /// 69: continued + Bad.staticBadNamMiddle(); // /// 70: continued + Bad.staticSetBadEmpty = 1; // /// 71: continued + Bad.staticSetBadStart = 1; // /// 72: continued + Bad.staticSetBadEnd = 1; // /// 73: continued + Bad.staticSetBadMiddle = 1; // /// 74: continued var bad = new Bad(); - bad.instanceBadEmpty(); // //# 75: continued - bad.instanceBadStart(); // //# 76: continued - bad.instanceBadEnd(); // //# 77: continued - bad.instanceBadMiddle(); // //# 78: continued - bad.instanceBadPosEmpty(); // //# 79: continued - bad.instanceBadPosEmpty(); // //# 80: continued - bad.instanceBadPosEmpty(); // //# 81: continued - bad.instanceBadPosEmpty(); // //# 82: continued - bad.instanceBadPosStart(); // //# 83: continued - bad.instanceBadPosStart(); // //# 84: continued - bad.instanceBadPosEnd(); // //# 85: continued - bad.instanceBadPosStart(); // //# 86: continued - bad.instanceBadPosMiddle(); // //# 87: continued - bad.instanceBadNamEmpty(); // //# 88: continued - bad.instanceBadNamEmpty(); // //# 89: continued - bad.instanceBadNamEmpty(); // //# 90: continued - bad.instanceBadNamEmpty(); // //# 91: continued - bad.instanceBadNamStart(); // //# 92: continued - bad.instanceBadNamStart(); // //# 93: continued - bad.instanceBadNamEnd(); // //# 94: continued - bad.instanceBadNamStart(); // //# 95: continued - bad.instanceBadNamMiddle(); // //# 96: continued - bad.instanceSetBadEmpty = 1; // //# 97: continued - bad.instanceSetBadStart = 1; // //# 98: continued - bad.instanceSetBadEnd = 1; // //# 99: continued - bad.instanceSetBadMiddle = 1; // //# 100: continued - bad * bad; // //# 101: continued - bad * bad; // //# 102: continued - bad * bad; // //# 103: continued - bad[1] = 1; // //# 104: continued - bad[1] = 1; // //# 105: continued - bad[1] = 1; // //# 106: continued - bad[1] = 1; // //# 107: continued + bad.instanceBadEmpty(); // /// 75: continued + bad.instanceBadStart(); // /// 76: continued + bad.instanceBadEnd(); // /// 77: continued + bad.instanceBadMiddle(); // /// 78: continued + bad.instanceBadPosEmpty(); // /// 79: continued + bad.instanceBadPosEmpty(); // /// 80: continued + bad.instanceBadPosEmpty(); // /// 81: continued + bad.instanceBadPosEmpty(); // /// 82: continued + bad.instanceBadPosStart(); // /// 83: continued + bad.instanceBadPosStart(); // /// 84: continued + bad.instanceBadPosEnd(); // /// 85: continued + bad.instanceBadPosStart(); // /// 86: continued + bad.instanceBadPosMiddle(); // /// 87: continued + bad.instanceBadNamEmpty(); // /// 88: continued + bad.instanceBadNamEmpty(); // /// 89: continued + bad.instanceBadNamEmpty(); // /// 90: continued + bad.instanceBadNamEmpty(); // /// 91: continued + bad.instanceBadNamStart(); // /// 92: continued + bad.instanceBadNamStart(); // /// 93: continued + bad.instanceBadNamEnd(); // /// 94: continued + bad.instanceBadNamStart(); // /// 95: continued + bad.instanceBadNamMiddle(); // /// 96: continued + bad.instanceSetBadEmpty = 1; // /// 97: continued + bad.instanceSetBadStart = 1; // /// 98: continued + bad.instanceSetBadEnd = 1; // /// 99: continued + bad.instanceSetBadMiddle = 1; // /// 100: continued + bad * bad; // /// 101: continued + bad * bad; // /// 102: continued + bad * bad; // /// 103: continued + bad[1] = 1; // /// 104: continued + bad[1] = 1; // /// 105: continued + bad[1] = 1; // /// 106: continued + bad[1] = 1; // /// 107: continued // This covers tests 108-166 bad.method(); - bad.f(() {}); // //# 167: compile-time error - bad.f(() {}); // //# 168: compile-time error - bad.f(() {}); // //# 169: compile-time error - bad.f(() {}); // //# 170: compile-time error - bad.f(() {}); // //# 171: compile-time error - bad.f(() {}); // //# 172: compile-time error - bad.f(() {}); // //# 173: compile-time error - bad.f(() {}); // //# 174: compile-time error - bad.f(() {}); // //# 175: compile-time error - bad.f(() {}); // //# 176: compile-time error - bad.f(() {}); // //# 177: compile-time error - bad.f(() {}); // //# 178: compile-time error - bad.f(() {}); // //# 179: compile-time error - bad.f(() {}); // //# 180: compile-time error - bad.f(() {}); // //# 181: compile-time error - bad.f(() {}); // //# 182: compile-time error - bad.f(() {}); // //# 183: compile-time error - bad.f(() {}); // //# 184: compile-time error - bad.f(() {}); // //# 185: compile-time error - bad.f(() {}); // //# 186: compile-time error - bad.f(() {}); // //# 187: compile-time error - bad.f(() {}); // //# 188: compile-time error + bad.f(() {}); // /// 167: compile-time error + bad.f(() {}); // /// 168: compile-time error + bad.f(() {}); // /// 169: compile-time error + bad.f(() {}); // /// 170: compile-time error + bad.f(() {}); // /// 171: compile-time error + bad.f(() {}); // /// 172: compile-time error + bad.f(() {}); // /// 173: compile-time error + bad.f(() {}); // /// 174: compile-time error + bad.f(() {}); // /// 175: compile-time error + bad.f(() {}); // /// 176: compile-time error + bad.f(() {}); // /// 177: compile-time error + bad.f(() {}); // /// 178: compile-time error + bad.f(() {}); // /// 179: compile-time error + bad.f(() {}); // /// 180: compile-time error + bad.f(() {}); // /// 181: compile-time error + bad.f(() {}); // /// 182: compile-time error + bad.f(() {}); // /// 183: compile-time error + bad.f(() {}); // /// 184: compile-time error + bad.f(() {}); // /// 185: compile-time error + bad.f(() {}); // /// 186: compile-time error + bad.f(() {}); // /// 187: compile-time error + bad.f(() {}); // /// 188: compile-time error - BadEmpty x; // //# 189: compile-time error - BadStart x; // //# 190: compile-time error - BadEnd x; // //# 191: compile-time error - BadMiddle x; // //# 192: compile-time error - BadPosEmpty x; // //# 193: compile-time error - BadPosEmpty x; // //# 194: compile-time error - BadPosEmpty x; // //# 195: compile-time error - BadPosEmpty x; // //# 196: compile-time error - BadPosStart x; // //# 197: compile-time error - BadPosStart x; // //# 198: compile-time error - BadPosEnd x; // //# 199: compile-time error - BadPosStart x; // //# 200: compile-time error - BadPosMiddle x; // //# 201: compile-time error - BadNamEmpty x; // //# 202: compile-time error - BadNamEmpty x; // //# 203: compile-time error - BadNamEmpty x; // //# 204: compile-time error - BadNamEmpty x; // //# 205: compile-time error - BadNamStart x; // //# 206: compile-time error - BadNamStart x; // //# 207: compile-time error - BadNamEnd x; // //# 208: compile-time error - BadNamStart x; // //# 209: compile-time error - BadNamMiddle x; // //# 210: compile-time error + BadEmpty x; // /// 189: compile-time error + BadStart x; // /// 190: compile-time error + BadEnd x; // /// 191: compile-time error + BadMiddle x; // /// 192: compile-time error + BadPosEmpty x; // /// 193: compile-time error + BadPosEmpty x; // /// 194: compile-time error + BadPosEmpty x; // /// 195: compile-time error + BadPosEmpty x; // /// 196: compile-time error + BadPosStart x; // /// 197: compile-time error + BadPosStart x; // /// 198: compile-time error + BadPosEnd x; // /// 199: compile-time error + BadPosStart x; // /// 200: compile-time error + BadPosMiddle x; // /// 201: compile-time error + BadNamEmpty x; // /// 202: compile-time error + BadNamEmpty x; // /// 203: compile-time error + BadNamEmpty x; // /// 204: compile-time error + BadNamEmpty x; // /// 205: compile-time error + BadNamStart x; // /// 206: compile-time error + BadNamStart x; // /// 207: compile-time error + BadNamEnd x; // /// 208: compile-time error + BadNamStart x; // /// 209: compile-time error + BadNamMiddle x; // /// 210: compile-time error } diff --git a/tests/language/argument_definition_test.dart b/tests/language/argument_definition_test.dart index 29756096585..1acdb51c312 100644 --- a/tests/language/argument_definition_test.dart +++ b/tests/language/argument_definition_test.dart @@ -7,7 +7,7 @@ import "package:expect/expect.dart"; int test(a, {b, c}) { - if (?b) return b; // //# 01: compile-time error + if (?b) return b; // /// 01: compile-time error return a + b + c; } diff --git a/tests/language/assert_initializer_test.dart b/tests/language/assert_initializer_test.dart index aabc96849c6..f100fb2bb23 100644 --- a/tests/language/assert_initializer_test.dart +++ b/tests/language/assert_initializer_test.dart @@ -9,7 +9,7 @@ bool assertsEnabled = false; main() { assert((assertsEnabled = true)); - runtimeAsserts(); // //# none: ok + runtimeAsserts(); // /// none: ok // Passing const expressions. const c00 = const AssertArgument.constFirst(true, 0, 1); @@ -32,53 +32,53 @@ main() { // Failing const expressions - const c = const AssertArgument.constFirst(false, 0, 1); // //# 01: compile-time error - const c = const AssertArgument.constLast(false, 0, 1); // //# 02: compile-time error - const c = const AssertArgument.constMiddle(false, 0, 1); // //# 03: compile-time error - const c = const AssertArgument.constMulti(false, 0, 1); // //# 04: compile-time error - const c = const AssertArgument.constFirstSuper(false, 0, 1); // //# 05: compile-time error - const c = const AssertArgument.constLastSuper(false, 0, 1); // //# 06: compile-time error - const c = const AssertArgument.constMiddleSuper(false, 0, 1); // //# 07: compile-time error - const c = const AssertArgument.constMultiSuper(false, 0, 1); // //# 08: compile-time error + const c = const AssertArgument.constFirst(false, 0, 1); // /// 01: compile-time error + const c = const AssertArgument.constLast(false, 0, 1); // /// 02: compile-time error + const c = const AssertArgument.constMiddle(false, 0, 1); // /// 03: compile-time error + const c = const AssertArgument.constMulti(false, 0, 1); // /// 04: compile-time error + const c = const AssertArgument.constFirstSuper(false, 0, 1); // /// 05: compile-time error + const c = const AssertArgument.constLastSuper(false, 0, 1); // /// 06: compile-time error + const c = const AssertArgument.constMiddleSuper(false, 0, 1); // /// 07: compile-time error + const c = const AssertArgument.constMultiSuper(false, 0, 1); // /// 08: compile-time error - const c = const AssertArgument.constFirst("str", 0, 1); // //# 11: compile-time error - const c = const AssertArgument.constLast("str", 0, 1); // //# 12: compile-time error - const c = const AssertArgument.constMiddle("str", 0, 1); // //# 13: compile-time error - const c = const AssertArgument.constMulti("str", 0, 1); // //# 14: compile-time error - const c = const AssertArgument.constFirstSuper("str", 0, 1); // //# 15: compile-time error - const c = const AssertArgument.constLastSuper("str", 0, 1); // //# 16: compile-time error - const c = const AssertArgument.constMiddleSuper("str", 0, 1); // //# 17: compile-time error - const c = const AssertArgument.constMultiSuper("str", 0, 1); // //# 18: compile-time error + const c = const AssertArgument.constFirst("str", 0, 1); // /// 11: compile-time error + const c = const AssertArgument.constLast("str", 0, 1); // /// 12: compile-time error + const c = const AssertArgument.constMiddle("str", 0, 1); // /// 13: compile-time error + const c = const AssertArgument.constMulti("str", 0, 1); // /// 14: compile-time error + const c = const AssertArgument.constFirstSuper("str", 0, 1); // /// 15: compile-time error + const c = const AssertArgument.constLastSuper("str", 0, 1); // /// 16: compile-time error + const c = const AssertArgument.constMiddleSuper("str", 0, 1); // /// 17: compile-time error + const c = const AssertArgument.constMultiSuper("str", 0, 1); // /// 18: compile-time error - const c = const AssertCompare.constFirst(3, 2); // //# 21: compile-time error - const c = const AssertCompare.constLast(3, 2); // //# 22: compile-time error - const c = const AssertCompare.constMiddle(3, 2); // //# 23: compile-time error - const c = const AssertCompare.constMulti(3, 2); // //# 24: compile-time error - const c = const AssertCompare.constFirstSuper(3, 2); // //# 25: compile-time error - const c = const AssertCompare.constLastSuper(3, 2); // //# 26: compile-time error - const c = const AssertCompare.constMiddleSuper(3, 2); // //# 27: compile-time error - const c = const AssertCompare.constMultiSuper(3, 2); // //# 28: compile-time error + const c = const AssertCompare.constFirst(3, 2); // /// 21: compile-time error + const c = const AssertCompare.constLast(3, 2); // /// 22: compile-time error + const c = const AssertCompare.constMiddle(3, 2); // /// 23: compile-time error + const c = const AssertCompare.constMulti(3, 2); // /// 24: compile-time error + const c = const AssertCompare.constFirstSuper(3, 2); // /// 25: compile-time error + const c = const AssertCompare.constLastSuper(3, 2); // /// 26: compile-time error + const c = const AssertCompare.constMiddleSuper(3, 2); // /// 27: compile-time error + const c = const AssertCompare.constMultiSuper(3, 2); // /// 28: compile-time error // Functions not allowed in asserts in const execution. - const c = const AssertArgument.constFirst(kTrue, 0, 1); // //# 31: compile-time error - const c = const AssertArgument.constLast(kTrue, 0, 1); // //# 32: compile-time error - const c = const AssertArgument.constMiddle(kTrue, 0, 1); // //# 33: compile-time error - const c = const AssertArgument.constMulti(kTrue, 0, 1); // //# 34: compile-time error - const c = const AssertArgument.constFirstSuper(kTrue, 0, 1); // //# 35: compile-time error - const c = const AssertArgument.constLastSuper(kTrue, 0, 1); // //# 36: compile-time error - const c = const AssertArgument.constMiddleSuper(kTrue, 0, 1); // //# 37: compile-time error - const c = const AssertArgument.constMultiSuper(kTrue, 0, 1); // //# 38: compile-time error + const c = const AssertArgument.constFirst(kTrue, 0, 1); // /// 31: compile-time error + const c = const AssertArgument.constLast(kTrue, 0, 1); // /// 32: compile-time error + const c = const AssertArgument.constMiddle(kTrue, 0, 1); // /// 33: compile-time error + const c = const AssertArgument.constMulti(kTrue, 0, 1); // /// 34: compile-time error + const c = const AssertArgument.constFirstSuper(kTrue, 0, 1); // /// 35: compile-time error + const c = const AssertArgument.constLastSuper(kTrue, 0, 1); // /// 36: compile-time error + const c = const AssertArgument.constMiddleSuper(kTrue, 0, 1); // /// 37: compile-time error + const c = const AssertArgument.constMultiSuper(kTrue, 0, 1); // /// 38: compile-time error const cTrue = const TrickCompare(true); // Value must be integer for potential-const expression to be actually const. - const c = const AssertCompare.constFirst(cTrue, 2); // //# 41: compile-time error - const c = const AssertCompare.constLast(cTrue, 2); // //# 42: compile-time error - const c = const AssertCompare.constMiddle(cTrue, 2); // //# 43: compile-time error - const c = const AssertCompare.constMulti(cTrue, 2); // //# 44: compile-time error - const c = const AssertCompare.constFirstSuper(cTrue, 2); // //# 45: compile-time error - const c = const AssertCompare.constLastSuper(cTrue, 2); // //# 46: compile-time error - const c = const AssertCompare.constMiddleSuper(cTrue, 2); // //# 47: compile-time error - const c = const AssertCompare.constMultiSuper(cTrue, 2); // //# 48: compile-time error + const c = const AssertCompare.constFirst(cTrue, 2); // /// 41: compile-time error + const c = const AssertCompare.constLast(cTrue, 2); // /// 42: compile-time error + const c = const AssertCompare.constMiddle(cTrue, 2); // /// 43: compile-time error + const c = const AssertCompare.constMulti(cTrue, 2); // /// 44: compile-time error + const c = const AssertCompare.constFirstSuper(cTrue, 2); // /// 45: compile-time error + const c = const AssertCompare.constLastSuper(cTrue, 2); // /// 46: compile-time error + const c = const AssertCompare.constMiddleSuper(cTrue, 2); // /// 47: compile-time error + const c = const AssertCompare.constMultiSuper(cTrue, 2); // /// 48: compile-time error } diff --git a/tests/language/assign_static_type_test.dart b/tests/language/assign_static_type_test.dart index 4f14c1ae87a..00f50d0b446 100644 --- a/tests/language/assign_static_type_test.dart +++ b/tests/language/assign_static_type_test.dart @@ -5,28 +5,28 @@ // This test insures that statically initialized variables, fields, and parameters // report static type warnings. -int a = "String"; // //# 01: static type warning, dynamic type error +int a = "String"; // /// 01: static type warning, dynamic type error class A { - static const int c = "String"; //# 02: static type warning, checked mode compile-time error - final int d = "String"; //# 03: static type warning, dynamic type error - int e = "String"; //# 04: static type warning, dynamic type error + static const int c = "String"; /// 02: static type warning, checked mode compile-time error + final int d = "String"; /// 03: static type warning, dynamic type error + int e = "String"; /// 04: static type warning, dynamic type error A() { - int f = "String"; //# 05: static type warning, dynamic type error + int f = "String"; /// 05: static type warning, dynamic type error } method([ - int // //# 06: static type warning + int // /// 06: static type warning g = "String"]) { return g; } } int main() { - var w = a; //# 01: continued + var w = a; /// 01: continued var x; - x = A.c; // //# 02: continued + x = A.c; // /// 02: continued var v = new A(); - x = v.d; // //# 03: continued - x = v.e; // //# 04: continued - x = v.method(1); //# 06: continued + x = v.d; // /// 03: continued + x = v.e; // /// 04: continued + x = v.method(1); /// 06: continued } diff --git a/tests/language/assign_to_type_test.dart b/tests/language/assign_to_type_test.dart index 7ecd74b09f4..97da693b6eb 100644 --- a/tests/language/assign_to_type_test.dart +++ b/tests/language/assign_to_type_test.dart @@ -11,7 +11,7 @@ noMethod(e) => e is NoSuchMethodError; class C { f() { - Expect.throws(() => T = null, noMethod); //# 01: static type warning + Expect.throws(() => T = null, noMethod); /// 01: static type warning } } @@ -23,7 +23,7 @@ typedef void F(); main() { new C().f(); - Expect.throws(() => D = null, noMethod); //# 02: static type warning - Expect.throws(() => E = null, noMethod); //# 03: static type warning - Expect.throws(() => F = null, noMethod); //# 04: static type warning + Expect.throws(() => D = null, noMethod); /// 02: static type warning + Expect.throws(() => E = null, noMethod); /// 03: static type warning + Expect.throws(() => F = null, noMethod); /// 04: static type warning } diff --git a/tests/language/assign_top_method_test.dart b/tests/language/assign_top_method_test.dart index e7dfc27f793..63df040f6d8 100644 --- a/tests/language/assign_top_method_test.dart +++ b/tests/language/assign_top_method_test.dart @@ -8,6 +8,6 @@ method() { return 0; } main() { // Illegal, can't change a top level method - Expect.throws(() { method = () { return 1; }; }, // //# 01: static type warning - (e) => e is NoSuchMethodError); // //# 01: continued + Expect.throws(() { method = () { return 1; }; }, // /// 01: static type warning + (e) => e is NoSuchMethodError); // /// 01: continued } diff --git a/tests/language/assignable_expression_test.dart b/tests/language/assignable_expression_test.dart index e192712ed3f..b5ed9fe4244 100644 --- a/tests/language/assignable_expression_test.dart +++ b/tests/language/assignable_expression_test.dart @@ -13,32 +13,32 @@ var tl_static_var = 0; main() { tl_static_var = 0; - (tl_static_var) = 0; // //# 01: compile-time error - (tl_static_var)++; // //# 02: compile-time error - ++(tl_static_var); // //# 03: compile-time error + (tl_static_var) = 0; // /// 01: compile-time error + (tl_static_var)++; // /// 02: compile-time error + ++(tl_static_var); // /// 03: compile-time error C.static_field = 0; - (C.static_field) = 0; // //# 11: compile-time error - (C.static_field)++; // //# 12: compile-time error - ++(C.static_field); // //# 13: compile-time error + (C.static_field) = 0; // /// 11: compile-time error + (C.static_field)++; // /// 12: compile-time error + ++(C.static_field); // /// 13: compile-time error tl_static_var = [1, 2, 3]; tl_static_var[0] = 0; (tl_static_var)[0] = 0; - (tl_static_var[0]) = 0; // //# 21: compile-time error - (tl_static_var[0])++; // //# 22: compile-time error - ++(tl_static_var[0]); // //# 23: compile-time error + (tl_static_var[0]) = 0; // /// 21: compile-time error + (tl_static_var[0])++; // /// 22: compile-time error + ++(tl_static_var[0]); // /// 23: compile-time error C.static_field = [1, 2, 3]; - (C.static_field[0]) = 0; // //# 31: compile-time error - (C.static_field[0])++; // //# 32: compile-time error - ++(C.static_field[0]); // //# 33: compile-time error + (C.static_field[0]) = 0; // /// 31: compile-time error + (C.static_field[0])++; // /// 32: compile-time error + ++(C.static_field[0]); // /// 33: compile-time error var a = 0; - (a) = 0; // //# 41: compile-time error - (a)++; // //# 42: compile-time error - ++(a); // //# 43: compile-time error + (a) = 0; // /// 41: compile-time error + (a)++; // /// 42: compile-time error + ++(a); // /// 43: compile-time error // Neat palindrome expression. x is assignable, ((x)) is not. - var funcnuf = (x) => ((x))=((x)) <= (x); // //# 50: compile-time error + var funcnuf = (x) => ((x))=((x)) <= (x); // /// 50: compile-time error } diff --git a/tests/language/async_await_syntax_test.dart b/tests/language/async_await_syntax_test.dart index fc3bb857f7a..bc3531a1249 100644 --- a/tests/language/async_await_syntax_test.dart +++ b/tests/language/async_await_syntax_test.dart @@ -10,292 +10,292 @@ var yield = 0; var await = 0; get st => new Stream.fromIterable([]); -a01a() async => null; // //# a01a: ok -a01b() async* => null; // //# a01b: compile-time error -a01c() sync* => null; // //# a01c: compile-time error -a01d() async => yield 5; // //# a01d: compile-time error -a02a() async {} // //# a02a: ok -a03a() async* {} // //# a03a: ok -a03b() async * {} // //# a03b: ok -a04a() sync* {} // //# a04a: ok -a04b() sync {} // //# a04b: compile-time error -a04c() sync * {} // //# a04c: ok -a05a() async { await 0; } // //# a05a: ok -a05b() async { // //# a05b: ok - await(a) {}; // //# a05b: continued - await(0); // //# a05b: continued -} // //# a05b: continued -a05c() { // //# a05c: ok - await(a) {}; // //# a05c: continued - await(0); // //# a05c: continued -} // //# a05c: continued -a05d() async { // //# a05d: compile-time error - await(a) {} // //# a05d: continued - await(0); // //# a05d: continued -} // //# a05d: continued -a05e() { // //# a05e: ok - await(a) {} // //# a05e: continued - await(0); // //# a05e: continued -} // //# a05e: continued -a05f() async { // //# a05f: compile-time error - var await = (a) {}; // //# a05f: continued - await(0); // //# a05f: continued -} // //# a05f: continued -a05g() async { // //# a05g: continued - yield 5; // //# a05g: compile-time error -} // //# a05g: continued -a05h() async { // //# a05h: continued - yield* st; // //# a05h: compile-time error -} // //# a05h: continued -a06a() async { await for (var o in st) {} } // //# a06a: ok -a06b() sync* { await for (var o in st) {} } // //# a06b: compile-time error -a07a() sync* { yield 0; } // //# a07a: ok -a07b() sync { yield 0; } // //# a07b: compile-time error -a08a() sync* { yield* []; } // //# a08a: ok -a08b() sync { yield 0; } // //# a08b: compile-time error -a09a() async* { yield 0; } // //# a09a: ok -a10a() async* { yield* []; } // //# a10a: static type warning +a01a() async => null; // /// a01a: ok +a01b() async* => null; // /// a01b: compile-time error +a01c() sync* => null; // /// a01c: compile-time error +a01d() async => yield 5; // /// a01d: compile-time error +a02a() async {} // /// a02a: ok +a03a() async* {} // /// a03a: ok +a03b() async * {} // /// a03b: ok +a04a() sync* {} // /// a04a: ok +a04b() sync {} // /// a04b: compile-time error +a04c() sync * {} // /// a04c: ok +a05a() async { await 0; } // /// a05a: ok +a05b() async { // /// a05b: ok + await(a) {}; // /// a05b: continued + await(0); // /// a05b: continued +} // /// a05b: continued +a05c() { // /// a05c: ok + await(a) {}; // /// a05c: continued + await(0); // /// a05c: continued +} // /// a05c: continued +a05d() async { // /// a05d: compile-time error + await(a) {} // /// a05d: continued + await(0); // /// a05d: continued +} // /// a05d: continued +a05e() { // /// a05e: ok + await(a) {} // /// a05e: continued + await(0); // /// a05e: continued +} // /// a05e: continued +a05f() async { // /// a05f: compile-time error + var await = (a) {}; // /// a05f: continued + await(0); // /// a05f: continued +} // /// a05f: continued +a05g() async { // /// a05g: continued + yield 5; // /// a05g: compile-time error +} // /// a05g: continued +a05h() async { // /// a05h: continued + yield* st; // /// a05h: compile-time error +} // /// a05h: continued +a06a() async { await for (var o in st) {} } // /// a06a: ok +a06b() sync* { await for (var o in st) {} } // /// a06b: compile-time error +a07a() sync* { yield 0; } // /// a07a: ok +a07b() sync { yield 0; } // /// a07b: compile-time error +a08a() sync* { yield* []; } // /// a08a: ok +a08b() sync { yield 0; } // /// a08b: compile-time error +a09a() async* { yield 0; } // /// a09a: ok +a10a() async* { yield* []; } // /// a10a: static type warning -get sync sync {} // //# a11a: compile-time error -get sync sync* {} // //# a11b: ok -get async async {} // //# a11c: ok -get async async* {} // //# a11d: ok +get sync sync {} // /// a11a: compile-time error +get sync sync* {} // /// a11b: ok +get async async {} // /// a11c: ok +get async async* {} // /// a11d: ok -get sync {} // //# a12a: ok -get sync* {} // //# a12b: compile-time error -get async {} // //# a12c: ok -get async* {} // //# a12d: compile-time error -get a12e sync* => null; // //# a12e: compile-time error -get a12f async* => null; // //# a12f: compile-time error -get a12g async => null; // //# a12g: ok +get sync {} // /// a12a: ok +get sync* {} // /// a12b: compile-time error +get async {} // /// a12c: ok +get async* {} // /// a12d: compile-time error +get a12e sync* => null; // /// a12e: compile-time error +get a12f async* => null; // /// a12f: compile-time error +get a12g async => null; // /// a12g: ok -int sync; // //# a13a: ok -int sync*; // //# a13b: compile-time error -int async; // //# a13c: ok -int async*; // //# a13d: compile-time error +int sync; // /// a13a: ok +int sync*; // /// a13b: compile-time error +int async; // /// a13c: ok +int async*; // /// a13d: compile-time error -var sync; // //# a14a: ok -var sync*; // //# a14b: compile-time error -var async; // //# a14c: ok -var async*; // //# a14d: compile-time error +var sync; // /// a14a: ok +var sync*; // /// a14b: compile-time error +var async; // /// a14c: ok +var async*; // /// a14d: compile-time error -sync() {} // //# a15a: ok -sync*() {} // //# a15b: compile-time error -async() {} // //# a15c: ok -async*() {} // //# a15d: compile-time error +sync() {} // /// a15a: ok +sync*() {} // /// a15b: compile-time error +async() {} // /// a15c: ok +async*() {} // /// a15d: compile-time error abstract class B { - b00a() async; // //# b00a: compile-time error - b00b() async*; // //# b00b: compile-time error - b00c() sync*; // //# b00c: compile-time error - b00d() sync; // //# b00d: compile-time error + b00a() async; // /// b00a: compile-time error + b00b() async*; // /// b00b: compile-time error + b00c() sync*; // /// b00c: compile-time error + b00d() sync; // /// b00d: compile-time error } class C extends B { C(); - factory C.e1() async { return null; } // //# e1: compile-time error - factory C.e2() async* { return null; } // //# e2: compile-time error - factory C.e3() sync* { return null; } // //# e3: compile-time error - factory C.e4() async = C; // //# e4: compile-time error - factory C.e5() async* = C; // //# e5: compile-time error - factory C.e6() sync* = C; // //# e6: compile-time error - C.e7() async {} // //# e7: compile-time error - C.e8() async* {} // //# e8: compile-time error - C.e9() sync* {} // //# e9: compile-time error + factory C.e1() async { return null; } // /// e1: compile-time error + factory C.e2() async* { return null; } // /// e2: compile-time error + factory C.e3() sync* { return null; } // /// e3: compile-time error + factory C.e4() async = C; // /// e4: compile-time error + factory C.e5() async* = C; // /// e5: compile-time error + factory C.e6() sync* = C; // /// e6: compile-time error + C.e7() async {} // /// e7: compile-time error + C.e8() async* {} // /// e8: compile-time error + C.e9() sync* {} // /// e9: compile-time error - b00a() {} // //# b00a: continued - b00b() {} // //# b00b: continued - b00c() {} // //# b00c: continued - b00d() {} // //# b00d: continued + b00a() {} // /// b00a: continued + b00b() {} // /// b00b: continued + b00c() {} // /// b00c: continued + b00d() {} // /// b00d: continued - b01a() async => null; // //# b01a: ok - b01b() async* => null; // //# b01b: compile-time error - b01c() sync* => null; // //# b01c: compile-time error - b02a() async {} // //# b02a: ok - b03a() async* {} // //# b03a: ok - b04a() sync* {} // //# b04a: ok - b04b() sync {} // //# b04b: compile-time error - b05a() async { await 0; } // //# b05a: ok - b06a() async { await for (var o in st) {} } // //# b06a: ok - b06b() async { await for ( ; ; ) {} } // //# b06b: compile-time error - b07a() sync* { yield 0; } // //# b07a: ok - b08a() sync* { yield* []; } // //# b08a: ok - b09a() async* { yield 0; } // //# b09a: ok - b10a() async* { yield* []; } // //# b10a: static type warning - b10b() async { yield 0; } // //# b10b: compile-time error + b01a() async => null; // /// b01a: ok + b01b() async* => null; // /// b01b: compile-time error + b01c() sync* => null; // /// b01c: compile-time error + b02a() async {} // /// b02a: ok + b03a() async* {} // /// b03a: ok + b04a() sync* {} // /// b04a: ok + b04b() sync {} // /// b04b: compile-time error + b05a() async { await 0; } // /// b05a: ok + b06a() async { await for (var o in st) {} } // /// b06a: ok + b06b() async { await for ( ; ; ) {} } // /// b06b: compile-time error + b07a() sync* { yield 0; } // /// b07a: ok + b08a() sync* { yield* []; } // /// b08a: ok + b09a() async* { yield 0; } // /// b09a: ok + b10a() async* { yield* []; } // /// b10a: static type warning + b10b() async { yield 0; } // /// b10b: compile-time error - get sync sync {} // //# b11a: compile-time error - get sync sync* {} // //# b11b: ok - get async async {} // //# b11c: ok - get async async* {} // //# b11d: ok + get sync sync {} // /// b11a: compile-time error + get sync sync* {} // /// b11b: ok + get async async {} // /// b11c: ok + get async async* {} // /// b11d: ok - get sync {} // //# b12a: ok - get sync* {} // //# b12b: compile-time error - get async {} // //# b12c: ok - get async* {} // //# b12d: compile-time error - get b12e sync* => null; // //# b12e: compile-time error - get b12f async* => null; // //# b12f: compile-time error - get b12g async => null; // //# b12g: ok + get sync {} // /// b12a: ok + get sync* {} // /// b12b: compile-time error + get async {} // /// b12c: ok + get async* {} // /// b12d: compile-time error + get b12e sync* => null; // /// b12e: compile-time error + get b12f async* => null; // /// b12f: compile-time error + get b12g async => null; // /// b12g: ok - int sync; // //# b13a: ok - int sync*; // //# b13b: compile-time error - int async; // //# b13c: ok - int async*; // //# b13d: compile-time error + int sync; // /// b13a: ok + int sync*; // /// b13b: compile-time error + int async; // /// b13c: ok + int async*; // /// b13d: compile-time error - var sync; // //# b14a: ok - var sync*; // //# b14b: compile-time error - var async; // //# b14c: ok - var async*; // //# b14d: compile-time error + var sync; // /// b14a: ok + var sync*; // /// b14b: compile-time error + var async; // /// b14c: ok + var async*; // /// b14d: compile-time error - sync() {} // //# b15a: ok - sync*() {} // //# b15b: compile-time error - async() {} // //# b15c: ok - async*() {} // //# b15d: compile-time error + sync() {} // /// b15a: ok + sync*() {} // /// b15b: compile-time error + async() {} // /// b15c: ok + async*() {} // /// b15d: compile-time error } method1() { - c01a() async => null; c01a(); // //# c01a: ok - c01b() async* => null; c01b(); // //# c01b: compile-time error - c01c() sync* => null; c01c(); // //# c01c: compile-time error - c02a() async {} c02a(); // //# c02a: ok - c03a() async* {} c03a(); // //# c03a: ok - c04a() sync* {} c04a(); // //# c04a: ok - c04b() sync {} c04b(); // //# c04b: compile-time error - c05a() async { await 0; } c05a(); // //# c05a: ok - c06a() async { await for (var o in st) {} } c06a(); // //# c06a: ok - c07a() sync* { yield 0; } c07a(); // //# c07a: ok - c08a() sync* { yield* []; } c08a(); // //# c08a: ok - c09a() async* { yield 0; } c09a(); // //# c09a: ok - c10a() async* { yield* []; } c10a(); // //# c10a: static type warning - c11a() async { yield -5; } c11a(); // //# c11a: compile-time error - c11b() async { yield* st; } c11b(); // //# c11b: compile-time error + c01a() async => null; c01a(); // /// c01a: ok + c01b() async* => null; c01b(); // /// c01b: compile-time error + c01c() sync* => null; c01c(); // /// c01c: compile-time error + c02a() async {} c02a(); // /// c02a: ok + c03a() async* {} c03a(); // /// c03a: ok + c04a() sync* {} c04a(); // /// c04a: ok + c04b() sync {} c04b(); // /// c04b: compile-time error + c05a() async { await 0; } c05a(); // /// c05a: ok + c06a() async { await for (var o in st) {} } c06a(); // /// c06a: ok + c07a() sync* { yield 0; } c07a(); // /// c07a: ok + c08a() sync* { yield* []; } c08a(); // /// c08a: ok + c09a() async* { yield 0; } c09a(); // /// c09a: ok + c10a() async* { yield* []; } c10a(); // /// c10a: static type warning + c11a() async { yield -5; } c11a(); // /// c11a: compile-time error + c11b() async { yield* st; } c11b(); // /// c11b: compile-time error } method2() { - var d01a = () async => null; d01a(); // //# d01a: ok - var d01b = () async* => null; d01b(); // //# d01b: compile-time error - var d01c = () sync* => null; d01c(); // //# d01c: compile-time error - var d02a = () async {}; d02a(); // //# d02a: ok - var d03a = () async* {}; d03a(); // //# d03a: ok - var d04a = () sync* {}; d04a(); // //# d04a: ok - var d04b = () sync {}; d04b(); // //# d04b: compile-time error - var d05a = () async { await 0; }; d05a(); // //# d05a: ok - var d06a = () async { await for (var o in st) {} }; d06a(); // //# d06a: ok - var d07a = () sync* { yield 0; }; d07a(); // //# d07a: ok - var d08a = () sync* { yield* []; }; d08a(); // //# d08a: ok - var d08b = () sync* { yield*0+1; }; d08b(); // //# d08b: static type warning - var d08c = () { yield*0+1; }; d08c(); // //# d08c: ok - var d09a = () async* { yield 0; }; d09a(); // //# d09a: ok - var d10a = () async* { yield* []; }; d10a(); // //# d10a: static type warning + var d01a = () async => null; d01a(); // /// d01a: ok + var d01b = () async* => null; d01b(); // /// d01b: compile-time error + var d01c = () sync* => null; d01c(); // /// d01c: compile-time error + var d02a = () async {}; d02a(); // /// d02a: ok + var d03a = () async* {}; d03a(); // /// d03a: ok + var d04a = () sync* {}; d04a(); // /// d04a: ok + var d04b = () sync {}; d04b(); // /// d04b: compile-time error + var d05a = () async { await 0; }; d05a(); // /// d05a: ok + var d06a = () async { await for (var o in st) {} }; d06a(); // /// d06a: ok + var d07a = () sync* { yield 0; }; d07a(); // /// d07a: ok + var d08a = () sync* { yield* []; }; d08a(); // /// d08a: ok + var d08b = () sync* { yield*0+1; }; d08b(); // /// d08b: static type warning + var d08c = () { yield*0+1; }; d08c(); // /// d08c: ok + var d09a = () async* { yield 0; }; d09a(); // /// d09a: ok + var d10a = () async* { yield* []; }; d10a(); // /// d10a: static type warning } void main() { var a; var c = new C(); - c = new C.e1(); //# e1: continued - c = new C.e2(); //# e2: continued - c = new C.e3(); //# e3: continued - c = new C.e4(); //# e4: continued - c = new C.e5(); //# e5: continued - c = new C.e6(); //# e6: continued - c = new C.e7(); //# e7: continued - c = new C.e8(); //# e8: continued - c = new C.e9(); //# e9: continued + c = new C.e1(); /// e1: continued + c = new C.e2(); /// e2: continued + c = new C.e3(); /// e3: continued + c = new C.e4(); /// e4: continued + c = new C.e5(); /// e5: continued + c = new C.e6(); /// e6: continued + c = new C.e7(); /// e7: continued + c = new C.e8(); /// e8: continued + c = new C.e9(); /// e9: continued - a01a(); // //# a01a: continued - a01b(); // //# a01b: continued - a01c(); // //# a01c: continued - a01d(); // //# a01d: continued - a02a(); // //# a02a: continued - a03a(); // //# a03a: continued - a03b(); // //# a03b: continued - a04a(); // //# a04a: continued - a04b(); // //# a04b: continued - a04c(); // //# a04c: continued - a05a(); // //# a05a: continued - a05b(); // //# a05b: continued - a05c(); // //# a05c: continued - a05d(); // //# a05d: continued - a05e(); // //# a05e: continued - a05f(); // //# a05f: continued - a05g(); // //# a05g: continued - a05h(); // //# a05h: continued - a06a(); // //# a06a: continued - a06b(); // //# a06b: continued - a07a(); // //# a07a: continued - a07b(); // //# a07b: continued - a08a(); // //# a08a: continued - a08b(); // //# a08b: continued - a09a(); // //# a09a: continued - a10a(); // //# a10a: continued - a = sync; // //# a11a: continued - a = sync; // //# a11b: continued - a = async; // //# a11c: continued - a = async; // //# a11d: continued - a = sync; // //# a12a: continued - a = sync; // //# a12b: continued - a = async; // //# a12c: continued - a = async; // //# a12d: continued - a = a12e; // //# a12e: continued - a = a12f; // //# a12f: continued - a = a12g; // //# a12g: continued - a = sync; // //# a13a: continued - a = sync; // //# a13b: continued - a = async; // //# a13c: continued - a = async; // //# a13d: continued - a = sync; // //# a14a: continued - a = sync; // //# a14b: continued - a = async; // //# a14c: continued - a = async; // //# a14d: continued - sync(); // //# a15a: continued - sync(); // //# a15b: continued - async(); // //# a15c: continued - async(); // //# a15d: continued + a01a(); // /// a01a: continued + a01b(); // /// a01b: continued + a01c(); // /// a01c: continued + a01d(); // /// a01d: continued + a02a(); // /// a02a: continued + a03a(); // /// a03a: continued + a03b(); // /// a03b: continued + a04a(); // /// a04a: continued + a04b(); // /// a04b: continued + a04c(); // /// a04c: continued + a05a(); // /// a05a: continued + a05b(); // /// a05b: continued + a05c(); // /// a05c: continued + a05d(); // /// a05d: continued + a05e(); // /// a05e: continued + a05f(); // /// a05f: continued + a05g(); // /// a05g: continued + a05h(); // /// a05h: continued + a06a(); // /// a06a: continued + a06b(); // /// a06b: continued + a07a(); // /// a07a: continued + a07b(); // /// a07b: continued + a08a(); // /// a08a: continued + a08b(); // /// a08b: continued + a09a(); // /// a09a: continued + a10a(); // /// a10a: continued + a = sync; // /// a11a: continued + a = sync; // /// a11b: continued + a = async; // /// a11c: continued + a = async; // /// a11d: continued + a = sync; // /// a12a: continued + a = sync; // /// a12b: continued + a = async; // /// a12c: continued + a = async; // /// a12d: continued + a = a12e; // /// a12e: continued + a = a12f; // /// a12f: continued + a = a12g; // /// a12g: continued + a = sync; // /// a13a: continued + a = sync; // /// a13b: continued + a = async; // /// a13c: continued + a = async; // /// a13d: continued + a = sync; // /// a14a: continued + a = sync; // /// a14b: continued + a = async; // /// a14c: continued + a = async; // /// a14d: continued + sync(); // /// a15a: continued + sync(); // /// a15b: continued + async(); // /// a15c: continued + async(); // /// a15d: continued - c.b00a(); // //# b00a: continued - c.b00b(); // //# b00b: continued - c.b00c(); // //# b00c: continued - c.b00d(); // //# b00d: continued - c.b01a(); // //# b01a: continued - c.b01b(); // //# b01b: continued - c.b01c(); // //# b01c: continued - c.b02a(); // //# b02a: continued - c.b03a(); // //# b03a: continued - c.b04a(); // //# b04a: continued - c.b04b(); // //# b04b: continued - c.b05a(); // //# b05a: continued - c.b06a(); // //# b06a: continued - c.b06b(); // //# b06b: continued - c.b07a(); // //# b07a: continued - c.b08a(); // //# b08a: continued - c.b09a(); // //# b09a: continued - c.b10a(); // //# b10a: continued - c.b10b(); // //# b10b: continued - a = c.sync; // //# b11a: continued - a = c.sync; // //# b11b: continued - a = c.async; // //# b11c: continued - a = c.async; // //# b11d: continued - a = c.sync; // //# b12a: continued - a = c.sync; // //# b12b: continued - a = c.async; // //# b12c: continued - a = c.async; // //# b12d: continued - a = c.b12e; // //# b12e: continued - a = c.b12f; // //# b12f: continued - a = c.b12g; // //# b12g: continued - a = c.sync; // //# b13a: continued - a = c.sync; // //# b13b: continued - a = c.async; // //# b13c: continued - a = c.async; // //# b13d: continued - a = c.sync; // //# b14a: continued - a = c.sync; // //# b14b: continued - a = c.async; // //# b14c: continued - a = c.async; // //# b14d: continued - c.sync(); // //# b15a: continued - c.sync(); // //# b15b: continued - c.async(); // //# b15c: continued - c.async(); // //# b15d: continued + c.b00a(); // /// b00a: continued + c.b00b(); // /// b00b: continued + c.b00c(); // /// b00c: continued + c.b00d(); // /// b00d: continued + c.b01a(); // /// b01a: continued + c.b01b(); // /// b01b: continued + c.b01c(); // /// b01c: continued + c.b02a(); // /// b02a: continued + c.b03a(); // /// b03a: continued + c.b04a(); // /// b04a: continued + c.b04b(); // /// b04b: continued + c.b05a(); // /// b05a: continued + c.b06a(); // /// b06a: continued + c.b06b(); // /// b06b: continued + c.b07a(); // /// b07a: continued + c.b08a(); // /// b08a: continued + c.b09a(); // /// b09a: continued + c.b10a(); // /// b10a: continued + c.b10b(); // /// b10b: continued + a = c.sync; // /// b11a: continued + a = c.sync; // /// b11b: continued + a = c.async; // /// b11c: continued + a = c.async; // /// b11d: continued + a = c.sync; // /// b12a: continued + a = c.sync; // /// b12b: continued + a = c.async; // /// b12c: continued + a = c.async; // /// b12d: continued + a = c.b12e; // /// b12e: continued + a = c.b12f; // /// b12f: continued + a = c.b12g; // /// b12g: continued + a = c.sync; // /// b13a: continued + a = c.sync; // /// b13b: continued + a = c.async; // /// b13c: continued + a = c.async; // /// b13d: continued + a = c.sync; // /// b14a: continued + a = c.sync; // /// b14b: continued + a = c.async; // /// b14c: continued + a = c.async; // /// b14d: continued + c.sync(); // /// b15a: continued + c.sync(); // /// b15b: continued + c.async(); // /// b15c: continued + c.async(); // /// b15d: continued method1(); method2(); diff --git a/tests/language/async_continue_label_test.dart b/tests/language/async_continue_label_test.dart index 3ace73af4da..d2d7cc85e90 100644 --- a/tests/language/async_continue_label_test.dart +++ b/tests/language/async_continue_label_test.dart @@ -10,14 +10,14 @@ test1() async { var r = 0; label: for(var i = 1, j = - await //# await_in_init: ok + await /// await_in_init: ok 10; i < 10 && j > - await //# await_in_condition: ok + await /// await_in_condition: ok -5; j--, i += - await //# await_in_update: ok + await /// await_in_update: ok 1) { if (i < - await //# await_in_body: ok + await /// await_in_body: ok 5 || j < -5) { continue label; } @@ -31,14 +31,14 @@ test2() async { var r = 0; label: for(var i = - await //# await_in_init: ok + await /// await_in_init: ok 0; i < - await //# await_in_condition: ok + await /// await_in_condition: ok 10; i += - await //# await_in_update: ok + await /// await_in_update: ok 1) { if (i < - await //# await_in_body: ok + await /// await_in_body: ok 5) { continue label; } @@ -52,14 +52,14 @@ test3() async { var r = 0, i, j; label: for(i = - await //# await_in_init: ok + await /// await_in_init: ok 0; i < - await //# await_in_condition: ok + await /// await_in_condition: ok 10; i += - await //# await_in_update: ok + await /// await_in_update: ok 1) { if (i < - await //# await_in_body: ok + await /// await_in_body: ok 5) { continue label; } @@ -73,14 +73,14 @@ test4() async { var r = 0; label: for(var i = - await //# await_in_init: ok + await /// await_in_init: ok 0; i < - await //# await_in_condition: ok + await /// await_in_condition: ok 10; i+= - await //# await_in_update: ok + await /// await_in_update: ok 1) { if (i < - await //# await_in_body: ok + await /// await_in_body: ok 5) { for (int i = 0; i < 10; i++) { continue label; diff --git a/tests/language/async_or_generator_return_type_stacktrace_test.dart b/tests/language/async_or_generator_return_type_stacktrace_test.dart index 9326d89e2b3..8f8dc4b34d2 100644 --- a/tests/language/async_or_generator_return_type_stacktrace_test.dart +++ b/tests/language/async_or_generator_return_type_stacktrace_test.dart @@ -4,13 +4,13 @@ import "package:expect/expect.dart"; -void badReturnTypeAsync() async {} // //# 01: static type warning -void badReturnTypeAsyncStar() async* {} // //# 02: static type warning -void badReturnTypeSyncStar() sync* {} // //# 03: static type warning +void badReturnTypeAsync() async {} // /// 01: static type warning +void badReturnTypeAsyncStar() async* {} // /// 02: static type warning +void badReturnTypeSyncStar() sync* {} // /// 03: static type warning main() { try { - badReturnTypeAsync(); // //# 01: continued + badReturnTypeAsync(); // /// 01: continued } catch(e, st) { Expect.isTrue(e is TypeError, "wrong exception type"); Expect.isTrue(st.toString().contains("badReturnTypeAsync"), @@ -18,7 +18,7 @@ main() { } try { - badReturnTypeAsyncStar(); // //# 02: continued + badReturnTypeAsyncStar(); // /// 02: continued } catch(e, st) { Expect.isTrue(e is TypeError, "wrong exception type"); Expect.isTrue(st.toString().contains("badReturnTypeAsyncStar"), @@ -26,7 +26,7 @@ main() { } try { - badReturnTypeSyncStar(); // //# 03: continued + badReturnTypeSyncStar(); // /// 03: continued } catch(e, st) { Expect.isTrue(e is TypeError, "wrong exception type"); Expect.isTrue(st.toString().contains("badReturnTypeSyncStar"), diff --git a/tests/language/async_return_types_test.dart b/tests/language/async_return_types_test.dart index 6cbd7faacd1..f8d194da0ce 100644 --- a/tests/language/async_return_types_test.dart +++ b/tests/language/async_return_types_test.dart @@ -14,18 +14,18 @@ Future foo2() async { return 3; } -Future //# wrongTypeParameter: static type warning, dynamic type error +Future /// wrongTypeParameter: static type warning, dynamic type error foo3() async { return "String"; } // Future is treated like Future -Future //# tooManyTypeParameters: static type warning +Future /// tooManyTypeParameters: static type warning foo4() async { return "String"; } -int //# wrongReturnType: static type warning, dynamic type error +int /// wrongReturnType: static type warning, dynamic type error foo5() async { return 3; } @@ -35,7 +35,7 @@ Future foo6() async { return new Future.value(3); } -Future> //# nestedFuture: static type warning, dynamic type error +Future> /// nestedFuture: static type warning, dynamic type error foo7() async { return new Future.value(3); } @@ -45,7 +45,7 @@ Iterable foo8() sync* { yield 1; // Can only have valueless return in sync* functions. return - 8 //# return_value_sync_star: compile-time error + 8 /// return_value_sync_star: compile-time error ; } @@ -53,7 +53,7 @@ Stream foo9() async* { yield 1; // Can only have valueless return in async* functions. return - 8 //# return_value_sync_star: compile-time error + 8 /// return_value_sync_star: compile-time error ; } diff --git a/tests/language/async_switch_test.dart b/tests/language/async_switch_test.dart index 8fabeb68aea..1e373211172 100644 --- a/tests/language/async_switch_test.dart +++ b/tests/language/async_switch_test.dart @@ -16,7 +16,7 @@ foo1(a) async { case 2: k += a; return k+2; - default: k = 2; //# withDefault: ok + default: k = 2; /// withDefault: ok } return k; } @@ -31,7 +31,7 @@ foo2(a) async { case 2: k += await a; return k+2; - default: k = 2; //# withDefault: ok + default: k = 2; /// withDefault: ok } return k; } @@ -45,7 +45,7 @@ foo3(a) async { case 2: k += a; return k+2; - default: k = 2; //# withDefault: ok + default: k = 2; /// withDefault: ok } return k; } @@ -59,7 +59,7 @@ foo4(value) async { case 2: k += 2; return 2 + k; - default: k = 2; //# withDefault: ok + default: k = 2; /// withDefault: ok } return k; } @@ -69,20 +69,20 @@ futureOf(a) async => await a; test() async { Expect.equals(1, await foo1(1)); Expect.equals(4, await foo1(2)); - Expect.equals(2, await foo1(3)); //# withDefault: ok - Expect.equals(0, await foo1(3)); //# none: ok + Expect.equals(2, await foo1(3)); /// withDefault: ok + Expect.equals(0, await foo1(3)); /// none: ok Expect.equals(1, await foo2(futureOf(1))); Expect.equals(4, await foo2(futureOf(2))); - Expect.equals(2, await foo2(futureOf(3))); //# withDefault: ok - Expect.equals(0, await foo2(futureOf(3))); //# none: ok + Expect.equals(2, await foo2(futureOf(3))); /// withDefault: ok + Expect.equals(0, await foo2(futureOf(3))); /// none: ok Expect.equals(1, await foo3(1)); Expect.equals(4, await foo3(2)); - Expect.equals(2, await foo3(3)); //# withDefault: ok - Expect.equals(0, await foo3(3)); //# none: ok + Expect.equals(2, await foo3(3)); /// withDefault: ok + Expect.equals(0, await foo3(3)); /// none: ok Expect.equals(1, await foo4(futureOf(1))); Expect.equals(4, await foo4(futureOf(2))); - Expect.equals(2, await foo4(futureOf(3))); //# withDefault: ok - Expect.equals(0, await foo4(futureOf(3))); //# none: ok + Expect.equals(2, await foo4(futureOf(3))); /// withDefault: ok + Expect.equals(0, await foo4(futureOf(3))); /// none: ok } void main() { diff --git a/tests/language/async_test.dart b/tests/language/async_test.dart index e85cece6bc5..5a7886b275e 100644 --- a/tests/language/async_test.dart +++ b/tests/language/async_test.dart @@ -13,7 +13,7 @@ Future topLevelWithParameter(int a) async { return 7 + a; } -int //# type-mismatch2: static type warning, dynamic type error +int /// type-mismatch2: static type warning, dynamic type error topLevelWithParameterWrongType(int a) async { return 7 + a; } @@ -32,11 +32,11 @@ class A { int _x; A(this._x); - A.fail() async; // //# constructor2: compile-time error - factory A.create() async {return null; } //# constructor3: compile-time error + A.fail() async; // /// constructor2: compile-time error + factory A.create() async {return null; } /// constructor3: compile-time error - int someMethod(int param1, int param2, int param3) async => _x + param2; //# type-mismatch3: static type warning, dynamic type error - int get getter async { return 5 + _x; } //# type-mismatch4: static type warning, dynamic type error + int someMethod(int param1, int param2, int param3) async => _x + param2; /// type-mismatch3: static type warning, dynamic type error + int get getter async { return 5 + _x; } /// type-mismatch4: static type warning, dynamic type error operator+(A other) async { return new A(_x + other._x); } @@ -47,11 +47,11 @@ class A { class B { final _y; const B._internal(this._y); - const factory B.createConst(int y) async = A._internal; // //# constructor4: compile-time error + const factory B.createConst(int y) async = A._internal; // /// constructor4: compile-time error B() : _y = null; - set dontDoThat(value) async {} // //# setter1: compile-time error + set dontDoThat(value) async {} // /// setter1: compile-time error } @@ -61,8 +61,8 @@ main() { asyncReturn = topLevelFunction(); Expect.isTrue(asyncReturn is Future); - int a1 = topLevelWithParameter(2); // //# type-mismatch1: static type warning, dynamic type error - int a2 = topLevelWithParameterWrongType(2); // //# type-mismatch2: continued + int a1 = topLevelWithParameter(2); // /// type-mismatch1: static type warning, dynamic type error + int a2 = topLevelWithParameterWrongType(2); // /// type-mismatch2: continued asyncReturn = topLevelWithParameter(4); Expect.isTrue(asyncReturn is Future); asyncReturn.then((int result) => Expect.equals(result, 11)); @@ -82,13 +82,13 @@ main() { A a = new A(13); - asyncReturn = a.someMethod(1,2,3); // //# type-mismatch3: continued - Expect.isTrue(asyncReturn is Future); // //# type-mismatch3: continued - asyncReturn.then((int result) => Expect.equals(result, 15)); // //# type-mismatch3: continued + asyncReturn = a.someMethod(1,2,3); // /// type-mismatch3: continued + Expect.isTrue(asyncReturn is Future); // /// type-mismatch3: continued + asyncReturn.then((int result) => Expect.equals(result, 15)); // /// type-mismatch3: continued - asyncReturn = a.getter; // //# type-mismatch4: continued - Expect.isTrue(asyncReturn is Future); // //# type-mismatch4: continued - asyncReturn.then((int result) => Expect.equals(result, 18)); // //# type-mismatch4: continued + asyncReturn = a.getter; // /// type-mismatch4: continued + Expect.isTrue(asyncReturn is Future); // /// type-mismatch4: continued + asyncReturn.then((int result) => Expect.equals(result, 18)); // /// type-mismatch4: continued var b = new A(9); asyncReturn = a + b; @@ -115,9 +115,9 @@ main() { Expect.isTrue(asyncReturn is Future); asyncReturn.then((int result) => Expect.equals(result, 28)); - var b1 = const B.createConst(4); // //# constructor4: compile-time error + var b1 = const B.createConst(4); // /// constructor4: compile-time error var b2 = new B(); - b2.dontDoThat = 4; // //# setter1: compile-time error + b2.dontDoThat = 4; // /// setter1: compile-time error var checkAsync = (var someFunc) { var toTest = someFunc(); @@ -126,6 +126,6 @@ main() { }; checkAsync(() async => 4); - new A.fail(); //# constructor2: continued - new A.create(); //# constructor3: continued + new A.fail(); /// constructor2: continued + new A.create(); /// constructor3: continued } diff --git a/tests/language/async_throw_in_catch_test.dart b/tests/language/async_throw_in_catch_test.dart index 0802167b72e..df8aa3e7723 100644 --- a/tests/language/async_throw_in_catch_test.dart +++ b/tests/language/async_throw_in_catch_test.dart @@ -31,7 +31,7 @@ foo1(Tracer tracer) async { tracer.trace("a"); // This await forces dart2js to rewrite the try into a state machine // instead of relying on the existing structure. - await new Future.value(3); //# forceAwait: ok + await new Future.value(3); /// forceAwait: ok tracer.trace("b"); throw "Error"; } catch (error) { @@ -48,7 +48,7 @@ foo1(Tracer tracer) async { foo2(Tracer tracer) async { try { tracer.trace("a"); - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("b"); throw "Error"; tracer.trace("c"); @@ -65,7 +65,7 @@ foo2(Tracer tracer) async { foo3(Tracer tracer) async { try { tracer.trace("a"); - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("b"); throw "Error"; tracer.trace("c"); @@ -82,7 +82,7 @@ foo3(Tracer tracer) async { foo4(Tracer tracer) async { try { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("a"); throw "Error"; } catch(error) { @@ -102,7 +102,7 @@ foo5(Tracer tracer) async { try { tracer.trace("a"); try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("b"); throw "Error"; } catch(error) { @@ -120,7 +120,7 @@ foo5(Tracer tracer) async { foo6(Tracer tracer) async { try { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("a"); throw "Error"; } catch(error) { @@ -141,7 +141,7 @@ foo6(Tracer tracer) async { foo7(Tracer tracer) async { try { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("a"); throw "Error"; } catch(error) { @@ -161,7 +161,7 @@ foo7(Tracer tracer) async { foo8(Tracer tracer) async { try { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("a"); throw "Error"; } catch(error) { @@ -182,7 +182,7 @@ foo9(Tracer tracer) async { try { while(true) { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("a"); throw "Error"; } catch(error) { @@ -212,7 +212,7 @@ foo10(Tracer tracer) async { } catch (error) { tracer.trace("b"); try { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued throw "Error2"; } catch(error) { tracer.trace("c"); @@ -245,7 +245,7 @@ foo11(Tracer tracer) async { tracer.trace("a"); if (firstTime) { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("b"); throw "Error"; } catch(error) { @@ -274,7 +274,7 @@ foo12(Tracer tracer) async { tracer.trace("a"); if (firstTime) { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("b"); throw "Error"; } catch(error) { @@ -308,7 +308,7 @@ foo13(Tracer tracer) async { tracer.trace("c"); try { try { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued tracer.trace("d"); throw "Error"; } finally { @@ -332,7 +332,7 @@ foo14(Tracer tracer) async { } catch (error) { tracer.trace("b"); try { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued throw "Error2"; } catch(error) { tracer.trace("c"); @@ -358,7 +358,7 @@ foo15(Tracer tracer) async { } catch (error) { tracer.trace("b"); try { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued throw "Error2"; } catch(error) { tracer.trace("c"); @@ -385,7 +385,7 @@ foo16(Tracer tracer) async { } catch (error) { tracer.trace("b"); try { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued throw "Error2"; } catch(error) { tracer.trace("c"); @@ -412,7 +412,7 @@ foo17(Tracer tracer) async { tracer.trace("b"); throw "Error"; } catch (error) { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued Expect.equals("Error", error); tracer.trace("c"); } finally { @@ -430,7 +430,7 @@ foo18(Tracer tracer) async { try { tracer.trace("b"); } finally { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued tracer.trace("c"); } tracer.trace("d"); diff --git a/tests/language/await_backwards_compatibility_test.dart b/tests/language/await_backwards_compatibility_test.dart index f511a988884..c8e2d590c67 100644 --- a/tests/language/await_backwards_compatibility_test.dart +++ b/tests/language/await_backwards_compatibility_test.dart @@ -14,13 +14,13 @@ get await => 4; test0() async { var x = await 7; Expect.equals(7, x); - var await = 1; // //# await1: compile-time error + var await = 1; // /// await1: compile-time error } test1() async { var x = await 9; Expect.equals(9, x); - var y = await; // //# await2: compile-time error + var y = await; // /// await2: compile-time error } // For functions that are not declared with the async modifier we allow await to @@ -29,13 +29,13 @@ test1() async { test2() { var y = await; Expect.equals(4, y); - var x = await 1; // //# await3: compile-time error + var x = await 1; // /// await3: compile-time error } test3() { var await = 3; Expect.equals(3, await); - var x = await 1; // //# await4: compile-time error + var x = await 1; // /// await4: compile-time error } main() { diff --git a/tests/language/bad_constructor_test.dart b/tests/language/bad_constructor_test.dart index eee5a29996a..dea3b369ea4 100644 --- a/tests/language/bad_constructor_test.dart +++ b/tests/language/bad_constructor_test.dart @@ -4,20 +4,20 @@ class A { // Constructor may not be static. - static A(); // //# 00: compile-time error + static A(); // /// 00: compile-time error // Factory may not be static. - static factory A() { return null; } // //# 01: compile-time error + static factory A() { return null; } // /// 01: compile-time error // Named constructor may not conflict with names of methods and fields. var m; - A.m() { m = 0; } // //# 04: compile-time error + A.m() { m = 0; } // /// 04: compile-time error set q(var value) { m = 0; } // No name conflict with q=. - A.q(); // //# 05: ok - A(); // //# 05: ok + A.q(); // /// 05: ok + A(); // /// 05: ok - A.foo() : m = 0; // //# 06: compile-time error + A.foo() : m = 0; // /// 06: compile-time error int foo(int a, int b) => a + b * m; } diff --git a/tests/language/bad_named_parameters2_test.dart b/tests/language/bad_named_parameters2_test.dart index 371f2383b4c..76334b99920 100644 --- a/tests/language/bad_named_parameters2_test.dart +++ b/tests/language/bad_named_parameters2_test.dart @@ -22,11 +22,11 @@ class BadNamedParameters2Test { try { caught = false; // No formal parameter named b. - np.foo(b:25); // //# 01: static type warning + np.foo(b:25); // /// 01: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 01: continued + Expect.equals(true, caught); /// 01: continued } } diff --git a/tests/language/bad_named_parameters_test.dart b/tests/language/bad_named_parameters_test.dart index c82524ad952..06510e0e42e 100644 --- a/tests/language/bad_named_parameters_test.dart +++ b/tests/language/bad_named_parameters_test.dart @@ -24,43 +24,43 @@ class BadNamedParametersTest { try { caught = false; // Parameter b passed twice. - np.f42(10, 25, b:25); //# 01: static type warning + np.f42(10, 25, b:25); /// 01: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 01: continued + Expect.equals(true, caught); /// 01: continued try { caught = false; // Parameter x does not exist. - np.f42(10, 25, x:99); //# 02: static type warning + np.f42(10, 25, x:99); /// 02: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 02: continued + Expect.equals(true, caught); /// 02: continued try { caught = false; // Parameter b1 does not exist. - np.f52(10, b:25, b1:99, c:35); //# 03: static type warning + np.f52(10, b:25, b1:99, c:35); /// 03: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 03: continued + Expect.equals(true, caught); /// 03: continued try { caught = false; // Too many parameters. - np.f42(10, 20, 30, 40); //# 04: static type warning + np.f42(10, 20, 30, 40); /// 04: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 04: continued + Expect.equals(true, caught); /// 04: continued try { caught = false; // Too few parameters. - np.f42(b:25); //# 05: static type warning + np.f42(b:25); /// 05: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 05: continued + Expect.equals(true, caught); /// 05: continued } } diff --git a/tests/language/bad_override_test.dart b/tests/language/bad_override_test.dart index 0f25206c942..e4ade0700f3 100644 --- a/tests/language/bad_override_test.dart +++ b/tests/language/bad_override_test.dart @@ -4,10 +4,10 @@ class Fisk { get fisk => null; - static // //# 01: static type warning + static // /// 01: static type warning set fisk(x) {} - static // //# 02: static type warning + static // /// 02: static type warning get hest => null; set hest(x) {} @@ -18,10 +18,10 @@ class Fisk { } class Hest extends Fisk { - static foo() {} // //# 03: compile-time error - field() {} // //# 04: compile-time error - var method; // //# 05: compile-time error - nullary(x) {} // //# 06: static type warning + static foo() {} // /// 03: compile-time error + field() {} // /// 04: compile-time error + var method; // /// 05: compile-time error + nullary(x) {} // /// 06: static type warning } main() { diff --git a/tests/language/bad_raw_string_test.dart b/tests/language/bad_raw_string_test.dart index 855f747e4cc..04bcb5499d6 100644 --- a/tests/language/bad_raw_string_test.dart +++ b/tests/language/bad_raw_string_test.dart @@ -5,19 +5,19 @@ main() { // Raw String may not contain newline (may not be multi-line). String x = '' - r' // //# 01: compile-time error -' // //# 01: continued - r" // //# 02: compile-time error -" // //# 02: continued + r' // /// 01: compile-time error +' // /// 01: continued + r" // /// 02: compile-time error +" // /// 02: continued // Test that a raw string containing just one character, a \n char, fails. // Enclose the test string in a bigger multiline string, except in case 03: - ''' // //# 03: compile-time error + ''' // /// 03: compile-time error """ - ''' // //# 03: continued + ''' // /// 03: continued r' ' - ''' // //# 03: continued + ''' // /// 03: continued """ - ''' // //# 03: continued + ''' // /// 03: continued ; } diff --git a/tests/language/bad_typedef_test.dart b/tests/language/bad_typedef_test.dart index 19908b82d80..f9839de5c5e 100644 --- a/tests/language/bad_typedef_test.dart +++ b/tests/language/bad_typedef_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; typedef int H(Function - Function // //# 00: compile-time error + Function // /// 00: compile-time error x); main() { diff --git a/tests/language/bit_operations_test.dart b/tests/language/bit_operations_test.dart index 27d0c5f9d0f..dc9bb514745 100644 --- a/tests/language/bit_operations_test.dart +++ b/tests/language/bit_operations_test.dart @@ -93,19 +93,19 @@ void testLeftShift64Bit() { Expect.equals(0xffffffff, t << 0); Expect.equals(0x1fffffffe, t << 1); Expect.equals(0x7fffffff80000000, t << 31); - Expect.equals(0x10000000000000000, 2*(t+1) << 31); //# 01: static type warning - Expect.equals(0x20000000000000000, 4*(t+1) << 31); //# 02: static type warning + Expect.equals(0x10000000000000000, 2*(t+1) << 31); /// 01: static type warning + Expect.equals(0x20000000000000000, 4*(t+1) << 31); /// 02: static type warning Expect.equals(0x8000000000000000, (t+1) << 31); } void testLeftShift64BitWithOverflow1() { var t = 0xffffffff; - Expect.equals(0x10000000000000000, 2*(t+1) << 31); //# 03: static type warning + Expect.equals(0x10000000000000000, 2*(t+1) << 31); /// 03: static type warning } void testLeftShift64BitWithOverflow2() { var t = 0xffffffff; - Expect.equals(0x20000000000000000, 4*(t+1) << 31); //# 04: static type warning + Expect.equals(0x20000000000000000, 4*(t+1) << 31); /// 04: static type warning } void testLeftShift64BitWithOverflow3() { diff --git a/tests/language/black_listed_test.dart b/tests/language/black_listed_test.dart index 43e35546592..9eed1292220 100644 --- a/tests/language/black_listed_test.dart +++ b/tests/language/black_listed_test.dart @@ -7,74 +7,74 @@ // implemented or extended. // bool. -class MyBool implements bool {} // //# 01: compile-time error -abstract class MyBoolInterface implements bool default F { // //# 02: compile-time error - MyBoolInterface(); // //# 02: continued -} // //# 02: continued +class MyBool implements bool {} // /// 01: compile-time error +abstract class MyBoolInterface implements bool default F { // /// 02: compile-time error + MyBoolInterface(); // /// 02: continued +} // /// 02: continued // num. -class MyNum implements num {} // //# 03: compile-time error -abstract class MyNumInterface implements num default F { // //# 04: compile-time error - MyNumInterface(); // //# 04: continued -} // //# 04: continued +class MyNum implements num {} // /// 03: compile-time error +abstract class MyNumInterface implements num default F { // /// 04: compile-time error + MyNumInterface(); // /// 04: continued +} // /// 04: continued // int. -class MyInt implements int {} // //# 05: compile-time error -abstract class MyIntInterface implements int default F { // //# 06: compile-time error - MyIntInterface(); // //# 06: continued -} // //# 06: continued +class MyInt implements int {} // /// 05: compile-time error +abstract class MyIntInterface implements int default F { // /// 06: compile-time error + MyIntInterface(); // /// 06: continued +} // /// 06: continued // double. -class MyDouble implements double {} // //# 07: compile-time error -abstract class MyDoubleInterface implements double default F { // //# 08: compile-time error - MyDoubleInterface(); // //# 08: continued -} // //# 08: continued +class MyDouble implements double {} // /// 07: compile-time error +abstract class MyDoubleInterface implements double default F { // /// 08: compile-time error + MyDoubleInterface(); // /// 08: continued +} // /// 08: continued // String. -class MyString implements String {} // //# 09: compile-time error -abstract class MyStringInterface implements String default F { // //# 10: compile-time error - MyStringInterface(); // //# 10: continued -} // //# 10: continued +class MyString implements String {} // /// 09: compile-time error +abstract class MyStringInterface implements String default F { // /// 10: compile-time error + MyStringInterface(); // /// 10: continued +} // /// 10: continued // Function. class MyFunction implements Function {} class MyOtherFunction extends Function {} -abstract class MyFunctionInterface implements Function default F { // //# 12: compile-time error - MyFunctionInterface(); // //# 12: continued -} // //# 12: continued +abstract class MyFunctionInterface implements Function default F { // /// 12: compile-time error + MyFunctionInterface(); // /// 12: continued +} // /// 12: continued // dynamic. -class MyDynamic implements dynamic {} // //# 13: compile-time error -abstract class MyDynamicInterface implements dynamic default F { // //# 14: compile-time error - MyDynamicInterface(); // //# 14: continued -} // //# 14: continued +class MyDynamic implements dynamic {} // /// 13: compile-time error +abstract class MyDynamicInterface implements dynamic default F { // /// 14: compile-time error + MyDynamicInterface(); // /// 14: continued +} // /// 14: continued class F { - factory MyBoolInterface() { return null; } // //# 02: continued - factory MyNumInterface() { return null; } // //# 04: continued - factory MyIntInterface() { return null; } // //# 06: continued - factory MyDoubleInterface() { return null; } // //# 08: continued - factory MyStringInterface() { return null; } // //# 10: continued - factory MyFunctionInterface() { return null; } // //# 12: continued - factory MyDynamicInterface() { return null; } // //# 14: continued + factory MyBoolInterface() { return null; } // /// 02: continued + factory MyNumInterface() { return null; } // /// 04: continued + factory MyIntInterface() { return null; } // /// 06: continued + factory MyDoubleInterface() { return null; } // /// 08: continued + factory MyStringInterface() { return null; } // /// 10: continued + factory MyFunctionInterface() { return null; } // /// 12: continued + factory MyDynamicInterface() { return null; } // /// 14: continued } main() { - new MyBool(); // //# 01: continued - new MyBoolInterface(); // //# 02: continued - new MyNum(); // //# 03: continued - new MyNumInterface(); // //# 04: continued - new MyInt(); // //# 05: continued - new MyIntInterface(); // //# 06: continued - new MyDouble(); // //# 07: continued - new MyDoubleInterface(); // //# 08: continued - new MyString(); // //# 09: continued - new MyStringInterface(); // //# 10: continued + new MyBool(); // /// 01: continued + new MyBoolInterface(); // /// 02: continued + new MyNum(); // /// 03: continued + new MyNumInterface(); // /// 04: continued + new MyInt(); // /// 05: continued + new MyIntInterface(); // /// 06: continued + new MyDouble(); // /// 07: continued + new MyDoubleInterface(); // /// 08: continued + new MyString(); // /// 09: continued + new MyStringInterface(); // /// 10: continued new MyFunction(); new MyOtherFunction(); - new MyFunctionInterface(); //# 12: continued - new MyDynamic(); // //# 13: continued - new MyDynamicInterface(); // //# 14: continued + new MyFunctionInterface(); /// 12: continued + new MyDynamic(); // /// 13: continued + new MyDynamicInterface(); // /// 14: continued } diff --git a/tests/language/bool_condition_check_test.dart b/tests/language/bool_condition_check_test.dart index fcf82b8d2d2..facab4b338f 100644 --- a/tests/language/bool_condition_check_test.dart +++ b/tests/language/bool_condition_check_test.dart @@ -20,5 +20,5 @@ class Class { } main() { - Expect.equals('', new Class(a: null, b: null).field); //# 01: dynamic type error + Expect.equals('', new Class(a: null, b: null).field); /// 01: dynamic type error } \ No newline at end of file diff --git a/tests/language/built_in_identifier_illegal_test.dart b/tests/language/built_in_identifier_illegal_test.dart index 29af0ea59a0..f80abb15485 100644 --- a/tests/language/built_in_identifier_illegal_test.dart +++ b/tests/language/built_in_identifier_illegal_test.dart @@ -4,21 +4,21 @@ // Check that we cannot use a pseudo keyword at the class level code. // Pseudo keywords are not allowed to be used as class names. -class abstract { } // //# 01: compile-time error -class as { } // //# 19: compile-time error -class dynamic { } // //# 04: compile-time error -class export { } // //# 17: compile-time error -class external { } // //# 20: compile-time error -class factory { } // //# 05: compile-time error -class get { } // //# 06: compile-time error -class implements { } // //# 07: compile-time error -class import { } // //# 08: compile-time error -class library { } // //# 10: compile-time error -class operator { } // //# 12: compile-time error -class part { } // //# 18: compile-time error -class set { } // //# 13: compile-time error -class static { } // //# 15: compile-time error -class typedef { } // //# 16: compile-time error +class abstract { } // /// 01: compile-time error +class as { } // /// 19: compile-time error +class dynamic { } // /// 04: compile-time error +class export { } // /// 17: compile-time error +class external { } // /// 20: compile-time error +class factory { } // /// 05: compile-time error +class get { } // /// 06: compile-time error +class implements { } // /// 07: compile-time error +class import { } // /// 08: compile-time error +class library { } // /// 10: compile-time error +class operator { } // /// 12: compile-time error +class part { } // /// 18: compile-time error +class set { } // /// 13: compile-time error +class static { } // /// 15: compile-time error +class typedef { } // /// 16: compile-time error main() { } diff --git a/tests/language/built_in_identifier_test.dart b/tests/language/built_in_identifier_test.dart index 602d28c49d4..813ff08de1e 100644 --- a/tests/language/built_in_identifier_test.dart +++ b/tests/language/built_in_identifier_test.dart @@ -12,11 +12,11 @@ class PseudoKWTest { // This is a list of built-in identifiers from the Dart spec. // It sanity checks that these pseudo-keywords are legal identifiers. - var abstract = 0; // //# 01: ok + var abstract = 0; // /// 01: ok var as = 0; var dynamic = 0; var export = 0; - var external = 0; // //# 01: ok + var external = 0; // /// 01: ok var factory = 0; var get = 0; var implements = 0; @@ -25,7 +25,7 @@ class PseudoKWTest { var operator = 0; var part = 0; var set = 0; - var static = 0; // //# 01: ok + var static = 0; // /// 01: ok var typedef = 0; // "native" is a per-implementation extension that is not a part of the @@ -38,7 +38,7 @@ class PseudoKWTest { // attempt at complete coverage. { void factory(set) { - return; // //# 01: ok + return; // /// 01: ok } } @@ -47,16 +47,16 @@ class PseudoKWTest { } return - static + // //# 01: ok + static + // /// 01: ok library * operator; } } -typedef(x) => "typedef $x"; // //# 01: ok +typedef(x) => "typedef $x"; // /// 01: ok -static(abstract) { // //# 01: ok - return abstract == true; // //# 01: ok -} // //# 01: ok +static(abstract) { // /// 01: ok + return abstract == true; // /// 01: ok +} // /// 01: ok class A { var typedef = 0; @@ -65,14 +65,14 @@ class A { set(x) { typedef = x; } get() => typedef - 5; - static static() { // //# 01: ok - return 1; // //# 01: ok - } // //# 01: ok + static static() { // /// 01: ok + return 1; // /// 01: ok + } // /// 01: ok static check() { var o = new A(); o.set(55); Expect.equals(50, o.get()); - static(); // //# 01: ok + static(); // /// 01: ok } } @@ -81,11 +81,11 @@ class B { get get => set; set get(get) => set = 2 * get.get; - static() { // //# 01: ok - var set = new B(); // //# 01: ok - set.get = set; // //# 01: ok - Expect.equals(200, set.get); // //# 01: ok - } // //# 01: ok + static() { // /// 01: ok + var set = new B(); // /// 01: ok + set.get = set; // /// 01: ok + Expect.equals(200, set.get); // /// 01: ok + } // /// 01: ok int operator() { return 1; } @@ -102,13 +102,13 @@ class C { main() { PseudoKWTest.testMain(); A.check(); - new B().static(); // //# 01: ok + new B().static(); // /// 01: ok Expect.equals(1, new B().operator()); - Expect.equals(1, A.static()); // //# 01: ok - typedef("T"); // //# 01: ok - Expect.equals("typedef T", typedef("T")); // //# 01: ok - static("true"); // //# 01: ok - Expect.equals(false, static("true")); // //# 01: ok + Expect.equals(1, A.static()); // /// 01: ok + typedef("T"); // /// 01: ok + Expect.equals("typedef T", typedef("T")); // /// 01: ok + static("true"); // /// 01: ok + Expect.equals(false, static("true")); // /// 01: ok Expect.equals(5, C.operator); Expect.equals(null, C.get); C.set = 0; diff --git a/tests/language/call_constructor_on_unresolvable_class_test.dart b/tests/language/call_constructor_on_unresolvable_class_test.dart index caf9b0c4899..4864d8775c7 100644 --- a/tests/language/call_constructor_on_unresolvable_class_test.dart +++ b/tests/language/call_constructor_on_unresolvable_class_test.dart @@ -19,20 +19,20 @@ never() { main() { if (never()) { // These should not produce errors because the calls are never executed. - new A(); // //# 01: static type warning - new A.foo(); // //# 02: static type warning - new lib.A(); // //# 03: static type warning + new A(); // /// 01: static type warning + new A.foo(); // /// 02: static type warning + new lib.A(); // /// 03: static type warning } - new A(); // //# 04: static type warning, runtime error - new A.foo(); // //# 05: static type warning, runtime error - new lib.A(); // //# 06: static type warning, runtime error + new A(); // /// 04: static type warning, runtime error + new A.foo(); // /// 05: static type warning, runtime error + new lib.A(); // /// 06: static type warning, runtime error - var ex; // //# 07: static type warning - try { // //# 07: continued - new A(); // //# 07: continued - } catch (e) { // //# 07: continued - ex = e; // //# 07: continued - } // //# 07: continued - Expect.isTrue(ex != null); //# 07: continued + var ex; // /// 07: static type warning + try { // /// 07: continued + new A(); // /// 07: continued + } catch (e) { // /// 07: continued + ex = e; // /// 07: continued + } // /// 07: continued + Expect.isTrue(ex != null); /// 07: continued } diff --git a/tests/language/call_non_method_field_test.dart b/tests/language/call_non_method_field_test.dart index a8b2e8e5058..fdc1fe3da9a 100644 --- a/tests/language/call_non_method_field_test.dart +++ b/tests/language/call_non_method_field_test.dart @@ -14,10 +14,10 @@ class Hest extends Fisk { main() { Fisk x1 = new Fisk(); if (false) { - x1.i(); // //# 01: static type warning + x1.i(); // /// 01: static type warning } Hest x2 = new Hest(); if (false) { - x2.i(); // //# 02: static type warning + x2.i(); // /// 02: static type warning } } diff --git a/tests/language/call_nonexistent_constructor_test.dart b/tests/language/call_nonexistent_constructor_test.dart index aa0d75a6cd1..d3cf60a3b28 100644 --- a/tests/language/call_nonexistent_constructor_test.dart +++ b/tests/language/call_nonexistent_constructor_test.dart @@ -20,17 +20,17 @@ main() { new A.foo(42); try { // Args are evaluated before throwing NoSuchMethodError: - new A.bar(foo()); //# 01: static type warning + new A.bar(foo()); /// 01: static type warning } on NoSuchMethodError catch (e) { i = -1; } on String catch (e) { i = 1; } - Expect.equals(1, i); //# 01: continued + Expect.equals(1, i); /// 01: continued try { - new A(); //# 02: static type warning + new A(); /// 02: static type warning } on NoSuchMethodError catch (e) { i = 2; } - Expect.equals(2, i); //# 02: continued + Expect.equals(2, i); /// 02: continued } diff --git a/tests/language/call_nonexistent_static_test.dart b/tests/language/call_nonexistent_static_test.dart index 92662c3b160..ab4a651dc44 100644 --- a/tests/language/call_nonexistent_static_test.dart +++ b/tests/language/call_nonexistent_static_test.dart @@ -10,12 +10,12 @@ import "package:expect/expect.dart"; class C {} class D { - get hest => 1; // //# 04: continued - set hest(val) {} // //# 05: continued + get hest => 1; // /// 04: continued + set hest(val) {} // /// 05: continued } -get fisk => 2; //# 09: continued -set fisk(val) {} //# 10: continued +get fisk => 2; /// 09: continued +set fisk(val) {} /// 10: continued expectNsme([void fun()]) { if (fun != null) { @@ -28,75 +28,75 @@ alwaysThrows() { } test01() { - C.hest = 1; // //# 01: static type warning + C.hest = 1; // /// 01: static type warning } test02() { - C.hest; // //# 02: static type warning + C.hest; // /// 02: static type warning } test03() { - C.hest(); // //# 03: static type warning + C.hest(); // /// 03: static type warning } test04() { - D.hest = 1; // //# 04: static type warning + D.hest = 1; // /// 04: static type warning } test05() { - D.hest; // //# 05: static type warning + D.hest; // /// 05: static type warning } test06() { - fisk = 1; // //# 06: static type warning + fisk = 1; // /// 06: static type warning } test07() { - fisk; // //# 07: static type warning + fisk; // /// 07: static type warning } test08() { - fisk(); // //# 08: static type warning + fisk(); // /// 08: static type warning } test09() { - fisk = 1; // //# 09: static type warning + fisk = 1; // /// 09: static type warning } test10() { - fisk; // //# 10: static type warning + fisk; // /// 10: static type warning } main() { expectNsme(alwaysThrows); expectNsme( - test01 // //# 01: continued + test01 // /// 01: continued ); expectNsme( - test02 // //# 02: continued + test02 // /// 02: continued ); expectNsme( - test03 // //# 03: continued + test03 // /// 03: continued ); expectNsme( - test04 // //# 04: continued + test04 // /// 04: continued ); expectNsme( - test05 // //# 05: continued + test05 // /// 05: continued ); expectNsme( - test06 // //# 06: continued + test06 // /// 06: continued ); expectNsme( - test07 // //# 07: continued + test07 // /// 07: continued ); expectNsme( - test08 // //# 08: continued + test08 // /// 08: continued ); expectNsme( - test09 // //# 09: continued + test09 // /// 09: continued ); expectNsme( - test10 // //# 10: continued + test10 // /// 10: continued ); } diff --git a/tests/language/call_through_getter_test.dart b/tests/language/call_through_getter_test.dart index 0d4f34be354..38c7c07360a 100644 --- a/tests/language/call_through_getter_test.dart +++ b/tests/language/call_through_getter_test.dart @@ -31,10 +31,10 @@ class CallThroughGetterTest { Expect.equals(2, topLevel()); expectThrowsNoSuchMethod(() { - TOP_LEVEL_CONST(); //# static type warning + TOP_LEVEL_CONST(); /// static type warning }); expectThrowsNoSuchMethod(() { - (TOP_LEVEL_CONST)(); // //# static type warning + (TOP_LEVEL_CONST)(); // /// static type warning }); } diff --git a/tests/language/call_type_literal_test.dart b/tests/language/call_type_literal_test.dart index b90e131103b..d24e778d445 100644 --- a/tests/language/call_type_literal_test.dart +++ b/tests/language/call_type_literal_test.dart @@ -7,5 +7,5 @@ import "package:expect/expect.dart"; class C { void a() {} } void main() { - Expect.throws(() => C().a(), (e) => e is NoSuchMethodError); //# 01: static type warning + Expect.throws(() => C().a(), (e) => e is NoSuchMethodError); /// 01: static type warning } diff --git a/tests/language/callable_test.dart b/tests/language/callable_test.dart index ab4670884ca..b78fdcdeabe 100644 --- a/tests/language/callable_test.dart +++ b/tests/language/callable_test.dart @@ -19,7 +19,7 @@ main() { Y y = new Y(); Function g = y; // Should pass checked mode test F f0 = y; // Should pass checked mode test - F f1 = x; // //# 00: dynamic type error, static type warning - G g0 = y; // //# 01: dynamic type error, static type warning + F f1 = x; // /// 00: dynamic type error, static type warning + G g0 = y; // /// 01: dynamic type error, static type warning } diff --git a/tests/language/cascade_test.dart b/tests/language/cascade_test.dart index e9bc29d5068..7600e1c333c 100644 --- a/tests/language/cascade_test.dart +++ b/tests/language/cascade_test.dart @@ -65,7 +65,7 @@ main() { ..import()..check(4, 7) ..["swap"]()()()..check(7, 4); a.check(7,4); - a..(42); // //# 01: compile-time error - a..37; // //# 02: compile-time error - a.."foo"; // //# 03: compile-time error + a..(42); // /// 01: compile-time error + a..37; // /// 02: compile-time error + a.."foo"; // /// 03: compile-time error } diff --git a/tests/language/cast2_test.dart b/tests/language/cast2_test.dart index 2e828c93bc1..260a6ffcfb1 100644 --- a/tests/language/cast2_test.dart +++ b/tests/language/cast2_test.dart @@ -22,7 +22,7 @@ main() { C oc = new C(); D od = new D(); - (oc as dynamic).bar; // //# 01: runtime error + (oc as dynamic).bar; // /// 01: runtime error // Casts should always evaluate the left-hand side, if only for its effects. oc.inc() as dynamic; diff --git a/tests/language/cast_test.dart b/tests/language/cast_test.dart index c420a900c7c..4b49bf52b18 100644 --- a/tests/language/cast_test.dart +++ b/tests/language/cast_test.dart @@ -35,42 +35,42 @@ main() { Expect.equals(42, (od as D).foo); Expect.equals(37, (od as D).bar); Expect.equals(37, ((od as C) as D).bar); - (oc as D).foo; // //# 01: runtime error + (oc as D).foo; // /// 01: runtime error (on as D).toString(); - (on as D).foo; // //# 02: runtime error - (on as C).foo; // //# 03: runtime error - oc.foo; // //# 04: static type warning - od.foo; // //# 05: static type warning + (on as D).foo; // /// 02: runtime error + (on as C).foo; // /// 03: runtime error + oc.foo; // /// 04: static type warning + od.foo; // /// 05: static type warning (on as Object).toString(); (oc as Object).toString(); (od as Object).toString(); (on as dynamic).toString(); - (on as dynamic).foo; // //# 07: runtime error + (on as dynamic).foo; // /// 07: runtime error (oc as dynamic).foo; (od as dynamic).foo; - (oc as dynamic).bar; // //# 08: runtime error + (oc as dynamic).bar; // /// 08: runtime error (od as dynamic).bar; C c = oc as C; c = od as C; c = oc; D d = od as D; - d = oc as D; // //# 10: runtime error + d = oc as D; // /// 10: runtime error d = od; (ol as List)[0]; (ol as List)[0]; (ol as dynamic)[0]; - (ol as String).length; // //# 12: runtime error + (ol as String).length; // /// 12: runtime error int x = (ol as List)[0]; (ol as List)[0] = (oi as int); (os as String).length; (os as dynamic).length; - (oi as String).length; // //# 13: runtime error - (os as List).length; // //# 14: runtime error + (oi as String).length; // /// 13: runtime error + (os as List).length; // /// 14: runtime error (oi as int) + 2; - (oi as List).length; // //# 15: runtime error + (oi as List).length; // /// 15: runtime error } diff --git a/tests/language/check_member_static_test.dart b/tests/language/check_member_static_test.dart index e89fb62f41f..e66c37da0bf 100644 --- a/tests/language/check_member_static_test.dart +++ b/tests/language/check_member_static_test.dart @@ -12,8 +12,8 @@ class B extends A { } class C extends B { - var a; //# 01: static type warning - static var b; //# 02: compile-time error + var a; /// 01: static type warning + static var b; /// 02: compile-time error } void main() { diff --git a/tests/language/check_method_override_test.dart b/tests/language/check_method_override_test.dart index c0275a6de72..bfd6e4a340b 100644 --- a/tests/language/check_method_override_test.dart +++ b/tests/language/check_method_override_test.dart @@ -8,8 +8,8 @@ class A { } class C extends A { - f() {} //# 01: static type warning - foo(var a, [x]) {} //# 02: static type warning + f() {} /// 01: static type warning + foo(var a, [x]) {} /// 02: static type warning } main() { diff --git a/tests/language/checked_null_test.dart b/tests/language/checked_null_test.dart index 36ffd7b7d96..95df12b2e7c 100644 --- a/tests/language/checked_null_test.dart +++ b/tests/language/checked_null_test.dart @@ -13,7 +13,7 @@ class A { } main() { - Expect.throws(bar); //# 01: continued + Expect.throws(bar); /// 01: continued } bar() { @@ -21,5 +21,5 @@ bar() { // receiver type is a typedef. Some code in the dart2js backend were // not dealing correctly with typedefs and lead the compiler to // crash. - new A().a.foo(); //# 01: static type warning + new A().a.foo(); /// 01: static type warning } diff --git a/tests/language/checked_setter3_test.dart b/tests/language/checked_setter3_test.dart index 21585f6e5e2..2af3a0dd152 100644 --- a/tests/language/checked_setter3_test.dart +++ b/tests/language/checked_setter3_test.dart @@ -19,11 +19,11 @@ class A { } class B { - T field = 42; //# 01: static type warning + T field = 42; /// 01: static type warning } class C { - T field = 42; //# 02: static type warning + T field = 42; /// 02: static type warning } main() { @@ -33,11 +33,11 @@ main() { var s = 'foo'; if (inCheckedMode) { Expect.throws(() => a.field = i, (e) => e is TypeError); - Expect.throws(() => new B(), (e) => e is TypeError); //# 01: continued - Expect.throws(() => c.field = s, (e) => e is TypeError); //# 02: continued + Expect.throws(() => new B(), (e) => e is TypeError); /// 01: continued + Expect.throws(() => c.field = s, (e) => e is TypeError); /// 02: continued } else { a.field = i; - new B(); //# 01: continued - c.field = s; //# 02: continued + new B(); /// 01: continued + c.field = s; /// 02: continued } } diff --git a/tests/language/class_cycle2_test.dart b/tests/language/class_cycle2_test.dart index 2b1bb6576ea..00ad363c552 100644 --- a/tests/language/class_cycle2_test.dart +++ b/tests/language/class_cycle2_test.dart @@ -8,11 +8,11 @@ class C extends B {} class A extends B {} class B - extends A // //# 01: compile-time error - extends A // //# 02: compile-time error + extends A // /// 01: compile-time error + extends A // /// 02: compile-time error {} main() { - new C(); // //# 01: continued - new List(); // //# 02: continued + new C(); // /// 01: continued + new List(); // /// 02: continued } diff --git a/tests/language/class_cycle_test.dart b/tests/language/class_cycle_test.dart index 8b58e2bb9e1..18be64c3a95 100644 --- a/tests/language/class_cycle_test.dart +++ b/tests/language/class_cycle_test.dart @@ -12,19 +12,19 @@ class C { } class Bar - extends Foo // //# 00: compile-time error - implements Foo // //# 01: compile-time error + extends Foo // /// 00: compile-time error + implements Foo // /// 01: compile-time error { } class ImplementsC implements C -, C // //# 02: compile-time error +, C // /// 02: compile-time error {} // Spec says: It is a compile-time error if the superclass // of a class C appears in the implements clause of C. class ExtendsC extends C -implements C // //# 03: compile-time error +implements C // /// 03: compile-time error {} main() { diff --git a/tests/language/class_keyword_test.dart b/tests/language/class_keyword_test.dart index bac7831a72c..ac2e8921314 100644 --- a/tests/language/class_keyword_test.dart +++ b/tests/language/class_keyword_test.dart @@ -6,6 +6,6 @@ class foo {} void main() { - int class = 10; //# 01: compile-time error - print("$class"); //# 02: compile-time error + int class = 10; /// 01: compile-time error + print("$class"); /// 02: compile-time error } diff --git a/tests/language/class_literal_test.dart b/tests/language/class_literal_test.dart index aa109456143..58de6dd3bc0 100644 --- a/tests/language/class_literal_test.dart +++ b/tests/language/class_literal_test.dart @@ -23,30 +23,30 @@ main() { Expect.isFalse(Class == null); // Verify that dereferencing a class literal is a runtime error. - Expect.throws(() { Class(); }, (e) => e is NoSuchMethodError); //# 01: static type warning - Expect.throws(() { Class[0]; }, (e) => e is NoSuchMethodError); //# 02: static type warning - Expect.throws(() { var x = Class(); }, (e) => e is NoSuchMethodError); //# 03: static type warning - Expect.throws(() { var x = Class[0]; }, (e) => e is NoSuchMethodError); //# 04: static type warning - Expect.throws(() { var x = Class[0].field; }, (e) => e is NoSuchMethodError); //# 05: static type warning - Expect.throws(() { var x = Class[0].method(); }, (e) => e is NoSuchMethodError); //# 06: static type warning - Expect.throws(() { foo(Class()); }, (e) => e is NoSuchMethodError); //# 07: static type warning - Expect.throws(() { foo(Class[0]); }, (e) => e is NoSuchMethodError); //# 08: static type warning - Expect.throws(() { foo(Class[0].field); }, (e) => e is NoSuchMethodError); //# 09: static type warning - Expect.throws(() { foo(Class[0].method()); }, (e) => e is NoSuchMethodError); //# 10: static type warning - Expect.throws(() { Class[0] = 91; }, (e) => e is NoSuchMethodError); //# 11: static type warning - Expect.throws(() { Class++; }, (e) => e is NoSuchMethodError); //# 12: static type warning - Expect.throws(() { ++Class; }, (e) => e is NoSuchMethodError); //# 13: static type warning - Expect.throws(() { Class[0] += 3; }, (e) => e is NoSuchMethodError); //# 14: static type warning - Expect.throws(() { ++Class[0]; }, (e) => e is NoSuchMethodError); //# 15: static type warning - Expect.throws(() { Class[0]++; }, (e) => e is NoSuchMethodError); //# 16: static type warning - Expect.throws(() { Class.method(); }, (e) => e is NoSuchMethodError); //# 17: static type warning - Expect.throws(() { Class.field; }, (e) => e is NoSuchMethodError); //# 18: static type warning - Expect.throws(() { var x = Class.method(); }, (e) => e is NoSuchMethodError); //# 19: static type warning - Expect.throws(() { var x = Class.field; }, (e) => e is NoSuchMethodError); //# 20: static type warning - Expect.throws(() { foo(Class.method()); }, (e) => e is NoSuchMethodError); //# 21: static type warning - Expect.throws(() { foo(Class.field); }, (e) => e is NoSuchMethodError); //# 22: static type warning - Expect.throws(() { Class / 3; }, (e) => e is NoSuchMethodError); //# 23: static type warning - Expect.throws(() { Class += 3; }, (e) => e is NoSuchMethodError); //# 24: static type warning + Expect.throws(() { Class(); }, (e) => e is NoSuchMethodError); /// 01: static type warning + Expect.throws(() { Class[0]; }, (e) => e is NoSuchMethodError); /// 02: static type warning + Expect.throws(() { var x = Class(); }, (e) => e is NoSuchMethodError); /// 03: static type warning + Expect.throws(() { var x = Class[0]; }, (e) => e is NoSuchMethodError); /// 04: static type warning + Expect.throws(() { var x = Class[0].field; }, (e) => e is NoSuchMethodError); /// 05: static type warning + Expect.throws(() { var x = Class[0].method(); }, (e) => e is NoSuchMethodError); /// 06: static type warning + Expect.throws(() { foo(Class()); }, (e) => e is NoSuchMethodError); /// 07: static type warning + Expect.throws(() { foo(Class[0]); }, (e) => e is NoSuchMethodError); /// 08: static type warning + Expect.throws(() { foo(Class[0].field); }, (e) => e is NoSuchMethodError); /// 09: static type warning + Expect.throws(() { foo(Class[0].method()); }, (e) => e is NoSuchMethodError); /// 10: static type warning + Expect.throws(() { Class[0] = 91; }, (e) => e is NoSuchMethodError); /// 11: static type warning + Expect.throws(() { Class++; }, (e) => e is NoSuchMethodError); /// 12: static type warning + Expect.throws(() { ++Class; }, (e) => e is NoSuchMethodError); /// 13: static type warning + Expect.throws(() { Class[0] += 3; }, (e) => e is NoSuchMethodError); /// 14: static type warning + Expect.throws(() { ++Class[0]; }, (e) => e is NoSuchMethodError); /// 15: static type warning + Expect.throws(() { Class[0]++; }, (e) => e is NoSuchMethodError); /// 16: static type warning + Expect.throws(() { Class.method(); }, (e) => e is NoSuchMethodError); /// 17: static type warning + Expect.throws(() { Class.field; }, (e) => e is NoSuchMethodError); /// 18: static type warning + Expect.throws(() { var x = Class.method(); }, (e) => e is NoSuchMethodError); /// 19: static type warning + Expect.throws(() { var x = Class.field; }, (e) => e is NoSuchMethodError); /// 20: static type warning + Expect.throws(() { foo(Class.method()); }, (e) => e is NoSuchMethodError); /// 21: static type warning + Expect.throws(() { foo(Class.field); }, (e) => e is NoSuchMethodError); /// 22: static type warning + Expect.throws(() { Class / 3; }, (e) => e is NoSuchMethodError); /// 23: static type warning + Expect.throws(() { Class += 3; }, (e) => e is NoSuchMethodError); /// 24: static type warning // Verify that a class literal isn't a string literal. Expect.notEquals(Class, "Class"); @@ -56,5 +56,5 @@ main() { var y = Class; Expect.isTrue(y.toString() is String); - Expect.throws(() { Class.toString(); }, (e) => e is NoSuchMethodError); //# 25: static type warning + Expect.throws(() { Class.toString(); }, (e) => e is NoSuchMethodError); /// 25: static type warning } diff --git a/tests/language/class_override_test.dart b/tests/language/class_override_test.dart index b14101e61e4..57b736029f3 100644 --- a/tests/language/class_override_test.dart +++ b/tests/language/class_override_test.dart @@ -10,14 +10,14 @@ class A { } class B extends A { - foo(a) {} // //# 00: static type warning + foo(a) {} // /// 00: static type warning } main() { B instance = new B(); try { instance.foo(); - } on NoSuchMethodError catch (error) { // //# 00: continued + } on NoSuchMethodError catch (error) { // /// 00: continued } finally { } print("Success"); diff --git a/tests/language/class_syntax_test.dart b/tests/language/class_syntax_test.dart index ea431389572..f14822d399f 100644 --- a/tests/language/class_syntax_test.dart +++ b/tests/language/class_syntax_test.dart @@ -7,6 +7,6 @@ main() { } class ClassSyntaxTest { - /* //# 01: compile-time error + /* /// 01: compile-time error } -*/ //# 01: continued +*/ /// 01: continued diff --git a/tests/language/closure_type_test.dart b/tests/language/closure_type_test.dart index ba11f8ab90d..81089c122d6 100644 --- a/tests/language/closure_type_test.dart +++ b/tests/language/closure_type_test.dart @@ -11,7 +11,7 @@ import 'dart:math' as math; class Math { static - int // //# 01: static type warning + int // /// 01: static type warning sqrt(x) => math.sqrt(x); } diff --git a/tests/language/code_after_try_is_executed_test.dart b/tests/language/code_after_try_is_executed_test.dart index 57ffd842cbe..010cc6a3a2a 100644 --- a/tests/language/code_after_try_is_executed_test.dart +++ b/tests/language/code_after_try_is_executed_test.dart @@ -15,5 +15,5 @@ main() { exception = ex; } Expect.isTrue(exception is String); - throw 'foo'; //# 01: runtime error + throw 'foo'; /// 01: runtime error } diff --git a/tests/language/compile_time_constant10_test.dart b/tests/language/compile_time_constant10_test.dart index 6d61278b050..a7a687f28de 100644 --- a/tests/language/compile_time_constant10_test.dart +++ b/tests/language/compile_time_constant10_test.dart @@ -86,14 +86,14 @@ const falseTests = const [ ]; // Not a constant if it's not written 'identical'. -const idtest = id(i1, i2); // //# 01: compile-time error +const idtest = id(i1, i2); // /// 01: compile-time error // Not a constant if aliased? (Current interpretation, waiting for // confirmation). -class T { // //# 02: compile-time error - static const identical = id; // //# 02: continued - static const idtest2 = identical(i1, i2); // //# 02: continued -} // //# 02: continued +class T { // /// 02: compile-time error + static const identical = id; // /// 02: continued + static const idtest2 = identical(i1, i2); // /// 02: continued +} // /// 02: continued main() { for (int i = 0; i < trueTests.length; i++) { @@ -103,7 +103,7 @@ main() { falseTests[i].test(Expect.isFalse, "false[$i]"); } - var x = idtest; // //# 01: continued - var x = T.idtest2; // //# 02: continued + var x = idtest; // /// 01: continued + var x = T.idtest2; // /// 02: continued } diff --git a/tests/language/compile_time_constant13_test.dart b/tests/language/compile_time_constant13_test.dart index 89acf62fcf4..b304132d2be 100644 --- a/tests/language/compile_time_constant13_test.dart +++ b/tests/language/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 + 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 + var x; // /// 03: compile-time error + get x => null; /// 04: 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/compile_time_constant_arguments_test.dart b/tests/language/compile_time_constant_arguments_test.dart index 891457c9eff..7a8c8a28dc9 100644 --- a/tests/language/compile_time_constant_arguments_test.dart +++ b/tests/language/compile_time_constant_arguments_test.dart @@ -10,13 +10,13 @@ class A { main() { const A(1); - const A(); //# 01: compile-time error, static type warning - const A(1, 2); //# 02: compile-time error, static type warning + const A(); /// 01: compile-time error, static type warning + const A(1, 2); /// 02: compile-time error, static type warning const A.named(); - const A.named(b: 1); //# 03: compile-time error, static type warning - const A.named(a: 1, a: 2); //# 04: compile-time error, static type warning - const A.named(a: 1, b: 2); //# 05: compile-time error, static type warning + const A.named(b: 1); /// 03: compile-time error, static type warning + const A.named(a: 1, a: 2); /// 04: compile-time error, static type warning + const A.named(a: 1, b: 2); /// 05: compile-time error, static type warning const A.optional(); const A.optional(42); - const A.optional(42, 54); //# 06: compile-time error, static type warning + const A.optional(42, 54); /// 06: compile-time error, static type warning } diff --git a/tests/language/compile_time_constant_c_test.dart b/tests/language/compile_time_constant_c_test.dart index 1a84633c367..72bacfbeb5b 100644 --- a/tests/language/compile_time_constant_c_test.dart +++ b/tests/language/compile_time_constant_c_test.dart @@ -6,13 +6,13 @@ const m0 = const { 499: 400 + 99 }; const m1 = const { - "foo" + "bar": 42 // //# 01: ok + "foo" + "bar": 42 // /// 01: ok }; const m2 = const { - "foo" * 4: 42 // //# 02: compile-time error + "foo" * 4: 42 // /// 02: compile-time error }; const m3 = const { - "foo".codeUnitAt(0): 42 // //# 03: compile-time error + "foo".codeUnitAt(0): 42 // /// 03: compile-time error }; use(x) => x; diff --git a/tests/language/compile_time_constant_checked2_test.dart b/tests/language/compile_time_constant_checked2_test.dart index 3a9a55eaa72..52cfc413cf3 100644 --- a/tests/language/compile_time_constant_checked2_test.dart +++ b/tests/language/compile_time_constant_checked2_test.dart @@ -4,26 +4,26 @@ class A { final int x; - const A.a1() : x = 'foo'; //# 01: continued + const A.a1() : x = 'foo'; /// 01: continued const A.a2(this.x); - const A.a3([this.x = 'foo']); //# 03: continued - const A.a4(String this.x); //# 04: continued - const A.a5(String x) : this.x = x; //# 05: continued + const A.a3([this.x = 'foo']); /// 03: continued + const A.a4(String this.x); /// 04: continued + const A.a5(String x) : this.x = x; /// 05: continued const A.a6(int x) : this.x = x; } -const a1 = const A.a1(); //# 01: static type warning, checked mode compile-time error -const a2 = const A.a2('foo'); //# 02: static type warning, checked mode compile-time error -const a3 = const A.a3(); //# 03: static type warning, checked mode compile-time error -const a4 = const A.a4('foo'); //# 04: static type warning, checked mode compile-time error -const a5 = const A.a5('foo'); //# 05: static type warning, checked mode compile-time error -const a6 = const A.a6('foo'); //# 06: static type warning, checked mode compile-time error +const a1 = const A.a1(); /// 01: static type warning, checked mode compile-time error +const a2 = const A.a2('foo'); /// 02: static type warning, checked mode compile-time error +const a3 = const A.a3(); /// 03: static type warning, checked mode compile-time error +const a4 = const A.a4('foo'); /// 04: static type warning, checked mode compile-time error +const a5 = const A.a5('foo'); /// 05: static type warning, checked mode compile-time error +const a6 = const A.a6('foo'); /// 06: static type warning, checked mode compile-time error main() { - print(a1); //# 01: continued - print(a2); //# 02: continued - print(a3); //# 03: continued - print(a4); //# 04: continued - print(a5); //# 05: continued - print(a6); //# 06: continued + print(a1); /// 01: continued + print(a2); /// 02: continued + print(a3); /// 03: continued + print(a4); /// 04: continued + print(a5); /// 05: continued + print(a6); /// 06: continued } diff --git a/tests/language/compile_time_constant_checked3_test.dart b/tests/language/compile_time_constant_checked3_test.dart index 8b9e04c8c37..336da4606e3 100644 --- a/tests/language/compile_time_constant_checked3_test.dart +++ b/tests/language/compile_time_constant_checked3_test.dart @@ -4,26 +4,26 @@ class A { final int x; - const A.a1() : x = 'foo'; //# 01: continued + const A.a1() : x = 'foo'; /// 01: continued const A.a2(this.x); - const A.a3([this.x = 'foo']); //# 03: continued - const A.a4(String this.x); //# 04: continued - const A.a5(String x) : this.x = x; //# 05: continued + const A.a3([this.x = 'foo']); /// 03: continued + const A.a4(String this.x); /// 04: continued + const A.a5(String x) : this.x = x; /// 05: continued const A.a6(int x) : this.x = x; } -var a1 = const A.a1(); //# 01: static type warning, checked mode compile-time error -var a2 = const A.a2('foo'); //# 02: static type warning, checked mode compile-time error -var a3 = const A.a3(); //# 03: static type warning, checked mode compile-time error -var a4 = const A.a4('foo'); //# 04: static type warning, checked mode compile-time error -var a5 = const A.a5('foo'); //# 05: static type warning, checked mode compile-time error -var a6 = const A.a6('foo'); //# 06: static type warning, checked mode compile-time error +var a1 = const A.a1(); /// 01: static type warning, checked mode compile-time error +var a2 = const A.a2('foo'); /// 02: static type warning, checked mode compile-time error +var a3 = const A.a3(); /// 03: static type warning, checked mode compile-time error +var a4 = const A.a4('foo'); /// 04: static type warning, checked mode compile-time error +var a5 = const A.a5('foo'); /// 05: static type warning, checked mode compile-time error +var a6 = const A.a6('foo'); /// 06: static type warning, checked mode compile-time error main() { - print(a1); //# 01: continued - print(a2); //# 02: continued - print(a3); //# 03: continued - print(a4); //# 04: continued - print(a5); //# 05: continued - print(a6); //# 06: continued + print(a1); /// 01: continued + print(a2); /// 02: continued + print(a3); /// 03: continued + print(a4); /// 04: continued + print(a5); /// 05: continued + print(a6); /// 06: continued } diff --git a/tests/language/compile_time_constant_checked4_test.dart b/tests/language/compile_time_constant_checked4_test.dart index 5cbff432e4b..f271e775f5f 100644 --- a/tests/language/compile_time_constant_checked4_test.dart +++ b/tests/language/compile_time_constant_checked4_test.dart @@ -5,13 +5,13 @@ class A { final _x; const A.a1( - String //# 01: checked mode compile-time error, static type warning + String /// 01: checked mode compile-time error, static type warning x) : this.a2(x); const A.a2( - String //# 02: checked mode compile-time error + String /// 02: checked mode compile-time error x) : this.a3(x); const A.a3( - String //# 03: checked mode compile-time error + String /// 03: checked mode compile-time error x) : _x = x; } diff --git a/tests/language/compile_time_constant_checked5_test.dart b/tests/language/compile_time_constant_checked5_test.dart index d370dd28ce5..d2a4aa3b00e 100644 --- a/tests/language/compile_time_constant_checked5_test.dart +++ b/tests/language/compile_time_constant_checked5_test.dart @@ -20,51 +20,51 @@ class D extends B implements C { } class Test1 { - final A x = const A(); //# 01: ok - final A x = const B(); //# 02: ok - final B x = const A(); //# 03: checked mode compile-time error - final B x = const C(); //# 04: checked mode compile-time error, static type warning - final B x = const C.d(); //# 05: static type warning + final A x = const A(); /// 01: ok + final A x = const B(); /// 02: ok + final B x = const A(); /// 03: checked mode compile-time error + final B x = const C(); /// 04: checked mode compile-time error, static type warning + final B x = const C.d(); /// 05: static type warning const Test1(); } // Will be instantiated with U=A and V=B. class Test2 { - final U x = const A(); //# 06: static type warning - final U x = const B(); //# 07: static type warning - final V x = const A(); //# 08: checked mode compile-time error, static type warning - final V x = const C(); //# 09: checked mode compile-time error, static type warning - final V x = const C.d(); //# 10: static type warning + final U x = const A(); /// 06: static type warning + final U x = const B(); /// 07: static type warning + final V x = const A(); /// 08: checked mode compile-time error, static type warning + final V x = const C(); /// 09: checked mode compile-time error, static type warning + final V x = const C.d(); /// 10: static type warning const Test2(); } // Will be instantiated with U=A and V=B. class Test3 { - final U x = const A(); //# 11: ok - final U x = const B(); //# 12: static type warning - final V x = const A(); //# 13: checked mode compile-time error - final V x = const C(); //# 14: checked mode compile-time error, static type warning - final V x = const C.d(); //# 15: static type warning + final U x = const A(); /// 11: ok + final U x = const B(); /// 12: static type warning + final V x = const A(); /// 13: checked mode compile-time error + final V x = const C(); /// 14: checked mode compile-time error, static type warning + final V x = const C.d(); /// 15: static type warning const Test3(); } // Will be instantiated with U=A and V=B. class Test4 { - final U x = const A(); //# 16: ok - final U x = const B(); //# 17: static type warning - final V x = const A(); //# 18: checked mode compile-time error - final V x = const C(); //# 19: checked mode compile-time error, static type warning - final V x = const C.d(); //# 20: static type warning + final U x = const A(); /// 16: ok + final U x = const B(); /// 17: static type warning + final V x = const A(); /// 18: checked mode compile-time error + final V x = const C(); /// 19: checked mode compile-time error, static type warning + final V x = const C.d(); /// 20: static type warning const Test4(); } // Will be instantiated with U=dynamic and V=dynamic. class Test5 { - final U x = const A(); //# 21: ok - final U x = const B(); //# 22: static type warning - final V x = const A(); //# 23: ok - final V x = const C(); //# 24: static type warning - final V x = const C.d(); //# 25: static type warning + final U x = const A(); /// 21: ok + final U x = const B(); /// 22: static type warning + final V x = const A(); /// 23: ok + final V x = const C(); /// 24: static type warning + final V x = const C.d(); /// 25: static type warning const Test5(); } diff --git a/tests/language/compile_time_constant_checked_test.dart b/tests/language/compile_time_constant_checked_test.dart index bff157e5052..26c0ecc6163 100644 --- a/tests/language/compile_time_constant_checked_test.dart +++ b/tests/language/compile_time_constant_checked_test.dart @@ -2,12 +2,12 @@ // 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. -final int x = 'foo'; //# 01: static type warning, dynamic type error -const int y = 'foo'; //# 02: static type warning, checked mode compile-time error -int z = 'foo'; //# 03: static type warning, dynamic type error +final int x = 'foo'; /// 01: static type warning, dynamic type error +const int y = 'foo'; /// 02: static type warning, checked mode compile-time error +int z = 'foo'; /// 03: static type warning, dynamic type error main() { - print(x); //# 01: continued - print(y); //# 02: continued - print(z); //# 03: continued + print(x); /// 01: continued + print(y); /// 02: continued + print(z); /// 03: continued } diff --git a/tests/language/compile_time_constant_k_test.dart b/tests/language/compile_time_constant_k_test.dart index 9014ce62e87..ebbbb5941f1 100644 --- a/tests/language/compile_time_constant_k_test.dart +++ b/tests/language/compile_time_constant_k_test.dart @@ -5,14 +5,14 @@ import "package:expect/expect.dart"; const x = const { - 'a': 3, // //# 01: static type warning + 'a': 3, // /// 01: static type warning 'a': 4 }; -const y = const { 'a': 10, 'b': 11, 'a': 12, // //# 02: static type warning - 'b': 13, 'a': 14 }; // //# 02: continued +const y = const { 'a': 10, 'b': 11, 'a': 12, // /// 02: static type warning + 'b': 13, 'a': 14 }; // /// 02: continued const z = const { - '__proto__': 496, // //# 03: static type warning - '__proto__': 497, // //# 03: continued - '__proto__': 498, // //# 03: continued + '__proto__': 496, // /// 03: static type warning + '__proto__': 497, // /// 03: continued + '__proto__': 498, // /// 03: continued '__proto__': 499 }; const x2 = const { 'a': 4 }; @@ -21,6 +21,6 @@ const z2 = const { '__proto__': 499 }; main() { Expect.identical(x2, x); - Expect.identical(y2, y); // //# 02: continued + Expect.identical(y2, y); // /// 02: continued Expect.identical(z2, z); } diff --git a/tests/language/compile_time_constant_o_test.dart b/tests/language/compile_time_constant_o_test.dart index c7a5afc533e..2438881d889 100644 --- a/tests/language/compile_time_constant_o_test.dart +++ b/tests/language/compile_time_constant_o_test.dart @@ -9,10 +9,10 @@ const str = "foo"; const m1 = const { "foo": 499 }; const m2 = const { "$str": 499 }; const m3 = const { - "$str": 42, //# 01: static type warning + "$str": 42, /// 01: static type warning "foo": 499 }; const m4 = const { - "foo": 42, //# 02: static type warning + "foo": 42, /// 02: static type warning "$str": 499 }; const m5 = const { "f" "o" "o": 499 }; diff --git a/tests/language/compile_time_constant_p_test.dart b/tests/language/compile_time_constant_p_test.dart index c6934eb7b28..37cc9c80ef3 100644 --- a/tests/language/compile_time_constant_p_test.dart +++ b/tests/language/compile_time_constant_p_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; class A { const A( - this.x // //# 01: compile-time error + this.x // /// 01: compile-time error ); final x = null; } diff --git a/tests/language/compile_time_constant_r_test.dart b/tests/language/compile_time_constant_r_test.dart index 060c5bbf4ca..b186f7ea144 100644 --- a/tests/language/compile_time_constant_r_test.dart +++ b/tests/language/compile_time_constant_r_test.dart @@ -3,18 +3,18 @@ // BSD-style license that can be found in the LICENSE file. const x = - throw // //# 01: compile-time error + throw // /// 01: compile-time error "x"; const y = const {0: - throw // //# 02: compile-time error + throw // /// 02: compile-time error "y"}; main() { print(x); print(y); const z = - throw // //# 03: compile-time error + throw // /// 03: compile-time error 1+1+1; print(z); } diff --git a/tests/language/compile_time_constant_test.dart b/tests/language/compile_time_constant_test.dart index 8c641bd3a30..ae3333d35a7 100644 --- a/tests/language/compile_time_constant_test.dart +++ b/tests/language/compile_time_constant_test.dart @@ -5,10 +5,10 @@ class Bad { int foo; final int bar = - foo //# 01: compile-time error + foo /// 01: compile-time error -1; static const int toto = - bar //# 02: compile-time error + bar /// 02: compile-time error -3; } diff --git a/tests/language/conditional_method_invocation_test.dart b/tests/language/conditional_method_invocation_test.dart index 5131d250aaa..0dd219deea7 100644 --- a/tests/language/conditional_method_invocation_test.dart +++ b/tests/language/conditional_method_invocation_test.dart @@ -30,35 +30,35 @@ main() { nullC()?.f(null); // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - Expect.equals(null, nullC()?.f(bad())); //# 01: ok - Expect.equals(1, new C()?.f(() => 1)); //# 02: ok + Expect.equals(null, nullC()?.f(bad())); /// 01: ok + Expect.equals(1, new C()?.f(() => 1)); /// 02: ok // C?.m(...) is equivalent to C.m(...). - Expect.equals(1, C?.staticF(() => 1)); //# 14: ok - Expect.equals(1, h.C?.staticF(() => 1)); //# 15: ok + Expect.equals(1, C?.staticF(() => 1)); /// 14: ok + Expect.equals(1, h.C?.staticF(() => 1)); /// 15: ok // The static type of o?.m(...) is the same as the static type of // o.m(...). - { int i = nullC()?.g(bad()); Expect.equals(null, i); } //# 03: ok - { int i = new C()?.g(() => 1); Expect.equals(1, i); } //# 04: ok - { String s = nullC()?.g(bad()); Expect.equals(null, s); } //# 05: static type warning - { String s = new C()?.g(() => null); Expect.equals(null, s); } //# 06: static type warning - { int i = C?.staticG(() => 1); Expect.equals(1, i); } //# 16: ok - { int i = h.C?.staticG(() => 1); Expect.equals(1, i); } //# 17: ok - { String s = C?.staticG(() => null); Expect.equals(null, s); } //# 18: static type warning - { String s = h.C?.staticG(() => null); Expect.equals(null, s); } //# 19: static type warning + { int i = nullC()?.g(bad()); Expect.equals(null, i); } /// 03: ok + { int i = new C()?.g(() => 1); Expect.equals(1, i); } /// 04: ok + { String s = nullC()?.g(bad()); Expect.equals(null, s); } /// 05: static type warning + { String s = new C()?.g(() => null); Expect.equals(null, s); } /// 06: static type warning + { int i = C?.staticG(() => 1); Expect.equals(1, i); } /// 16: ok + { int i = h.C?.staticG(() => 1); Expect.equals(1, i); } /// 17: ok + { String s = C?.staticG(() => null); Expect.equals(null, s); } /// 18: static type warning + { String s = h.C?.staticG(() => null); Expect.equals(null, s); } /// 19: static type warning // Let T be the static type of o and let y be a fresh variable of type T. // Exactly the same static warnings that would be caused by y.m(...) are also // generated in the case of o?.m(...). - { B b = new C(); Expect.equals(1, b?.f(() => 1)); } //# 07: static type warning - { int i = 1; Expect.equals(null, nullC()?.f(i)); } //# 08: static type warning + { B b = new C(); Expect.equals(1, b?.f(() => 1)); } /// 07: static type warning + { int i = 1; Expect.equals(null, nullC()?.f(i)); } /// 08: static type warning // '?.' can't be used to access toplevel functions in libraries imported via // prefix. - h?.topLevelFunction(); //# 11: compile-time error + h?.topLevelFunction(); /// 11: compile-time error // Nor can it be used to access the toString method on the class Type. - Expect.throws(() => C?.toString(), noMethod); //# 12: static type warning - Expect.throws(() => h.C?.toString(), noMethod); //# 13: static type warning + Expect.throws(() => C?.toString(), noMethod); /// 12: static type warning + Expect.throws(() => h.C?.toString(), noMethod); /// 13: static type warning } diff --git a/tests/language/conditional_property_access_test.dart b/tests/language/conditional_property_access_test.dart index d841a0cd4da..b5dfa85f432 100644 --- a/tests/language/conditional_property_access_test.dart +++ b/tests/language/conditional_property_access_test.dart @@ -26,32 +26,32 @@ main() { nullC()?.v; // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - Expect.equals(null, nullC()?.v); //# 01: ok - Expect.equals(1, new C(1)?.v); //# 02: ok + Expect.equals(null, nullC()?.v); /// 01: ok + Expect.equals(1, new C(1)?.v); /// 02: ok // C?.id is equivalent to C.id. - { C.staticInt = 1; Expect.equals(1, C?.staticInt); } //# 12: ok - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt); } //# 13: ok + { C.staticInt = 1; Expect.equals(1, C?.staticInt); } /// 12: ok + { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt); } /// 13: ok // The static type of e1?.d is the static type of e1.id. - { int i = new C(1)?.v; Expect.equals(1, i); } //# 03: ok - { String s = new C(null)?.v; Expect.equals(null, s); } //# 04: static type warning - { C.staticInt = 1; int i = C?.staticInt; Expect.equals(1, i); } //# 14: ok - { h.C.staticInt = 1; int i = h.C?.staticInt; Expect.equals(1, i); } //# 15: ok - { C.staticInt = null; String s = C?.staticInt; Expect.equals(null, s); } //# 16: static type warning - { h.C.staticInt = null; String s = h.C?.staticInt; Expect.equals(null, s); } //# 17: static type warning + { int i = new C(1)?.v; Expect.equals(1, i); } /// 03: ok + { String s = new C(null)?.v; Expect.equals(null, s); } /// 04: static type warning + { C.staticInt = 1; int i = C?.staticInt; Expect.equals(1, i); } /// 14: ok + { h.C.staticInt = 1; int i = h.C?.staticInt; Expect.equals(1, i); } /// 15: ok + { C.staticInt = null; String s = C?.staticInt; Expect.equals(null, s); } /// 16: static type warning + { h.C.staticInt = null; String s = h.C?.staticInt; Expect.equals(null, s); } /// 17: static type warning // Let T be the static type of e1 and let y be a fresh variable of type T. // Exactly the same static warnings that would be caused by y.id are also // generated in the case of e1?.id. - Expect.equals(null, nullC()?.bad); //# 05: static type warning - { B b = new C(1); Expect.equals(1, b?.v); } //# 06: static type warning + Expect.equals(null, nullC()?.bad); /// 05: static type warning + { B b = new C(1); Expect.equals(1, b?.v); } /// 06: static type warning // '?.' cannot be used to access toplevel properties in libraries imported via // prefix. - var x = h?.topLevelVar; //# 09: compile-time error + var x = h?.topLevelVar; /// 09: compile-time error // Nor can it be used to access the hashCode getter on the class Type. - Expect.throws(() => C?.hashCode, noMethod); //# 10: static type warning - Expect.throws(() => h.C?.hashCode, noMethod); //# 11: static type warning + Expect.throws(() => C?.hashCode, noMethod); /// 10: static type warning + Expect.throws(() => h.C?.hashCode, noMethod); /// 11: static type warning } diff --git a/tests/language/conditional_property_assignment_test.dart b/tests/language/conditional_property_assignment_test.dart index b27b9419319..12071984647 100644 --- a/tests/language/conditional_property_assignment_test.dart +++ b/tests/language/conditional_property_assignment_test.dart @@ -48,53 +48,53 @@ main() { nullC()?.v = 1; // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - Expect.equals(null, nullC()?.v = bad()); //# 01: ok - { C c = new C(1); Expect.equals(2, c?.v = 2); Expect.equals(2, c.v); } //# 02: ok + Expect.equals(null, nullC()?.v = bad()); /// 01: ok + { C c = new C(1); Expect.equals(2, c?.v = 2); Expect.equals(2, c.v); } /// 02: ok // C?.v = e2 is equivalent to C.v = e2. - { C.staticInt = 1; Expect.equals(2, C?.staticInt = 2); Expect.equals(2, C.staticInt); } //# 23: ok - { h.C.staticInt = 1; Expect.equals(2, h.C?.staticInt = 2); Expect.equals(2, h.C.staticInt); } //# 24: ok + { C.staticInt = 1; Expect.equals(2, C?.staticInt = 2); Expect.equals(2, C.staticInt); } /// 23: ok + { h.C.staticInt = 1; Expect.equals(2, h.C?.staticInt = 2); Expect.equals(2, h.C.staticInt); } /// 24: ok // The static type of e1?.v = e2 is the static type of e2. - { D d = new D(new E()); G g = new G(); F f = (d?.v = g); Expect.identical(f, g); } //# 03: ok - { D d = new D(new E()); E e = new G(); F f = (d?.v = e); Expect.identical(f, e); } //# 04: static type warning - { D.staticE = new E(); G g = new G(); F f = (D?.staticE = g); Expect.identical(f, g); } //# 25: ok - { h.D.staticE = new h.E(); h.G g = new h.G(); h.F f = (h.D?.staticE = g); Expect.identical(f, g); } //# 26: ok - { D.staticE = new E(); E e = new G(); F f = (D?.staticE = e); Expect.identical(f, e); } //# 27: static type warning - { h.D.staticE = new h.E(); h.E e = new h.G(); h.F f = (h.D?.staticE = e); Expect.identical(f, e); } //# 28: static type warning + { D d = new D(new E()); G g = new G(); F f = (d?.v = g); Expect.identical(f, g); } /// 03: ok + { D d = new D(new E()); E e = new G(); F f = (d?.v = e); Expect.identical(f, e); } /// 04: static type warning + { D.staticE = new E(); G g = new G(); F f = (D?.staticE = g); Expect.identical(f, g); } /// 25: ok + { h.D.staticE = new h.E(); h.G g = new h.G(); h.F f = (h.D?.staticE = g); Expect.identical(f, g); } /// 26: ok + { D.staticE = new E(); E e = new G(); F f = (D?.staticE = e); Expect.identical(f, e); } /// 27: static type warning + { h.D.staticE = new h.E(); h.E e = new h.G(); h.F f = (h.D?.staticE = e); Expect.identical(f, e); } /// 28: static type warning // Exactly the same static warnings that would be caused by e1.v = e2 are // also generated in the case of e1?.v = e2. - Expect.equals(null, nullC()?.bad = bad()); //# 05: static type warning - { B b = new C(1); Expect.equals(2, b?.v = 2); Expect.equals(2, (b as C).v); } //# 06: static type warning + Expect.equals(null, nullC()?.bad = bad()); /// 05: static type warning + { B b = new C(1); Expect.equals(2, b?.v = 2); Expect.equals(2, (b as C).v); } /// 06: static type warning // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - Expect.equals(null, nullC()?.v += bad()); //# 07: ok - { C c = new C(1); Expect.equals(3, c?.v += 2); Expect.equals(3, c.v); } //# 08: ok + Expect.equals(null, nullC()?.v += bad()); /// 07: ok + { C c = new C(1); Expect.equals(3, c?.v += 2); Expect.equals(3, c.v); } /// 08: ok // C?.v op= e2 is equivalent to C.v op= e2. - { C.staticInt = 1; Expect.equals(3, C?.staticInt += 2); Expect.equals(3, C?.staticInt); } //# 29: ok + { C.staticInt = 1; Expect.equals(3, C?.staticInt += 2); Expect.equals(3, C?.staticInt); } /// 29: ok // The static type of e1?.v op= e2 is the static type of e1.v op e2. - { D d = new D(new E()); F f = (d?.v += 1); Expect.identical(d.v, f); } //# 09: ok - { D.staticE = new E(); F f = (D?.staticE += 1); Expect.identical(D.staticE, f); } //# 30: ok - { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += 1); Expect.identical(h.D.staticE, f); } //# 31: ok + { D d = new D(new E()); F f = (d?.v += 1); Expect.identical(d.v, f); } /// 09: ok + { D.staticE = new E(); F f = (D?.staticE += 1); Expect.identical(D.staticE, f); } /// 30: ok + { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += 1); Expect.identical(h.D.staticE, f); } /// 31: ok // Let T be the static type of e1 and let y be a fresh variable of type T. // Exactly the same static warnings that would be caused by y.v op e2 are // also generated in the case of e1?.v op= e2. - Expect.equals(null, nullC()?.bad = bad()); //# 10: static type warning - { B b = new C(1); Expect.equals(3, b?.v += 2); Expect.equals(3, (b as C).v); } //# 11: static type warning - { D d = new D(new E()); F f = (d?.v += nullC()); Expect.identical(d.v, f); } //# 12: static type warning - { D d = new D(new E()); H h = (d?.v += 1); Expect.identical(d.v, h); } //# 13: static type warning - { D.staticE = new E(); F f = (D?.staticE += nullC()); Expect.identical(D.staticE, f); } //# 32: static type warning - { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += h.nullC()); Expect.identical(h.D.staticE, f); } //# 33: static type warning - { D.staticE = new E(); H h = (D?.staticE += 1); Expect.identical(D.staticE, h); } //# 34: static type warning - { h.D.staticE = new h.E(); h.H hh = (h.D?.staticE += 1); Expect.identical(h.D.staticE, hh); } //# 35: static type warning + Expect.equals(null, nullC()?.bad = bad()); /// 10: static type warning + { B b = new C(1); Expect.equals(3, b?.v += 2); Expect.equals(3, (b as C).v); } /// 11: static type warning + { D d = new D(new E()); F f = (d?.v += nullC()); Expect.identical(d.v, f); } /// 12: static type warning + { D d = new D(new E()); H h = (d?.v += 1); Expect.identical(d.v, h); } /// 13: static type warning + { D.staticE = new E(); F f = (D?.staticE += nullC()); Expect.identical(D.staticE, f); } /// 32: static type warning + { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += h.nullC()); Expect.identical(h.D.staticE, f); } /// 33: static type warning + { D.staticE = new E(); H h = (D?.staticE += 1); Expect.identical(D.staticE, h); } /// 34: static type warning + { h.D.staticE = new h.E(); h.H hh = (h.D?.staticE += 1); Expect.identical(h.D.staticE, hh); } /// 35: static type warning // '?.' cannot be used to assign to toplevel properties in libraries imported // via prefix. - h?.topLevelVar = null; //# 20: compile-time error - h?.topLevelVar += null; //# 21: compile-time error - h?.topLevelVar ??= null; //# 22: compile-time error + h?.topLevelVar = null; /// 20: compile-time error + h?.topLevelVar += null; /// 21: compile-time error + h?.topLevelVar ??= null; /// 22: compile-time error } diff --git a/tests/language/conditional_property_increment_decrement_test.dart b/tests/language/conditional_property_increment_decrement_test.dart index 4f0e587a9b0..81a27c65b5a 100644 --- a/tests/language/conditional_property_increment_decrement_test.dart +++ b/tests/language/conditional_property_increment_decrement_test.dart @@ -41,66 +41,66 @@ main() { nullC()?.v = 1; // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - Expect.equals(null, nullC()?.v++); //# 01: ok - { C c = new C(1); Expect.equals(1, c?.v++); Expect.equals(2, c.v); } //# 02: ok + Expect.equals(null, nullC()?.v++); /// 01: ok + { C c = new C(1); Expect.equals(1, c?.v++); Expect.equals(2, c.v); } /// 02: ok // C?.v++ is equivalent to C.v++. - { C.staticInt = 1; Expect.equals(1, C?.staticInt++); Expect.equals(2, C.staticInt); } //# 17: ok - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt++); Expect.equals(2, h.C.staticInt); } //# 18: ok + { C.staticInt = 1; Expect.equals(1, C?.staticInt++); Expect.equals(2, C.staticInt); } /// 17: ok + { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt++); Expect.equals(2, h.C.staticInt); } /// 18: ok // The static type of e1?.v++ is the same as the static type of e1.v. - { E e1 = new E(); D d = new D(e1); E e2 = d?.v++; Expect.identical(e1, e2); } //# 03: ok - { G g = new G(); D d = new D(g); F f = d?.v++; Expect.identical(f, g); } //# 04: static type warning - { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE++; Expect.identical(e1, e2); } //# 19: ok - { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE++; Expect.identical(e1, e2); } //# 20: ok - { G g = new G(); D.staticE = g; F f = D?.staticE++; Expect.identical(f, g); } //# 21: static type warning - { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE++; Expect.identical(f, g); } //# 22: static type warning + { E e1 = new E(); D d = new D(e1); E e2 = d?.v++; Expect.identical(e1, e2); } /// 03: ok + { G g = new G(); D d = new D(g); F f = d?.v++; Expect.identical(f, g); } /// 04: static type warning + { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE++; Expect.identical(e1, e2); } /// 19: ok + { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE++; Expect.identical(e1, e2); } /// 20: ok + { G g = new G(); D.staticE = g; F f = D?.staticE++; Expect.identical(f, g); } /// 21: static type warning + { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE++; Expect.identical(f, g); } /// 22: static type warning // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - Expect.equals(null, nullC()?.v--); //# 05: ok - { C c = new C(1); Expect.equals(1, c?.v--); Expect.equals(0, c.v); } //# 06: ok + Expect.equals(null, nullC()?.v--); /// 05: ok + { C c = new C(1); Expect.equals(1, c?.v--); Expect.equals(0, c.v); } /// 06: ok // C?.v-- is equivalent to C.v--. - { C.staticInt = 1; Expect.equals(1, C?.staticInt--); Expect.equals(0, C.staticInt); } //# 23: ok - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt--); Expect.equals(0, h.C.staticInt); } //# 24: ok + { C.staticInt = 1; Expect.equals(1, C?.staticInt--); Expect.equals(0, C.staticInt); } /// 23: ok + { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt--); Expect.equals(0, h.C.staticInt); } /// 24: ok // The static type of e1?.v-- is the same as the static type of e1.v. - { E e1 = new E(); D d = new D(e1); E e2 = d?.v--; Expect.identical(e1, e2); } //# 07: ok - { G g = new G(); D d = new D(g); F f = d?.v--; Expect.identical(f, g); } //# 08: static type warning - { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE--; Expect.identical(e1, e2); } //# 25: ok - { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE--; Expect.identical(e1, e2); } //# 26: ok - { G g = new G(); D.staticE = g; F f = D?.staticE--; Expect.identical(f, g); } //# 27: static type warning - { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE--; Expect.identical(f, g); } //# 28: static type warning + { E e1 = new E(); D d = new D(e1); E e2 = d?.v--; Expect.identical(e1, e2); } /// 07: ok + { G g = new G(); D d = new D(g); F f = d?.v--; Expect.identical(f, g); } /// 08: static type warning + { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE--; Expect.identical(e1, e2); } /// 25: ok + { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE--; Expect.identical(e1, e2); } /// 26: ok + { G g = new G(); D.staticE = g; F f = D?.staticE--; Expect.identical(f, g); } /// 27: static type warning + { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE--; Expect.identical(f, g); } /// 28: static type warning // ++e1?.v is equivalent to e1?.v += 1. - Expect.equals(null, ++nullC()?.v); //# 09: ok - { C c = new C(1); Expect.equals(2, ++c?.v); Expect.equals(2, c.v); } //# 10: ok + Expect.equals(null, ++nullC()?.v); /// 09: ok + { C c = new C(1); Expect.equals(2, ++c?.v); Expect.equals(2, c.v); } /// 10: ok // ++C?.v is equivalent to C?.v += 1. - { C.staticInt = 1; Expect.equals(2, ++C?.staticInt); Expect.equals(2, C.staticInt); } //# 29: ok - { h.C.staticInt = 1; Expect.equals(2, ++h.C?.staticInt); Expect.equals(2, h.C.staticInt); } //# 30: ok + { C.staticInt = 1; Expect.equals(2, ++C?.staticInt); Expect.equals(2, C.staticInt); } /// 29: ok + { h.C.staticInt = 1; Expect.equals(2, ++h.C?.staticInt); Expect.equals(2, h.C.staticInt); } /// 30: ok // The static type of ++e1?.v is the same as the static type of e1.v + 1. - { D d = new D(new E()); F f = ++d?.v; Expect.identical(d.v, f); } //# 11: ok - { D d = new D(new E()); H h = ++d?.v; Expect.identical(d.v, h); } //# 12: static type warning - { D.staticE = new E(); F f = ++D?.staticE; Expect.identical(D.staticE, f); } //# 31: ok - { h.D.staticE = new h.E(); h.F f = ++h.D?.staticE; Expect.identical(h.D.staticE, f); } //# 32: ok - { D.staticE = new E(); H h = ++D?.staticE; Expect.identical(D.staticE, h); } //# 33: static type warning - { h.D.staticE = new h.E(); h.H hh = ++h.D?.staticE; Expect.identical(h.D.staticE, hh); } //# 34: static type warning + { D d = new D(new E()); F f = ++d?.v; Expect.identical(d.v, f); } /// 11: ok + { D d = new D(new E()); H h = ++d?.v; Expect.identical(d.v, h); } /// 12: static type warning + { D.staticE = new E(); F f = ++D?.staticE; Expect.identical(D.staticE, f); } /// 31: ok + { h.D.staticE = new h.E(); h.F f = ++h.D?.staticE; Expect.identical(h.D.staticE, f); } /// 32: ok + { D.staticE = new E(); H h = ++D?.staticE; Expect.identical(D.staticE, h); } /// 33: static type warning + { h.D.staticE = new h.E(); h.H hh = ++h.D?.staticE; Expect.identical(h.D.staticE, hh); } /// 34: static type warning // --e1?.v is equivalent to e1?.v -= 1. - Expect.equals(null, --nullC()?.v); //# 13: ok - { C c = new C(1); Expect.equals(0, --c?.v); Expect.equals(0, c.v); } //# 14: ok + Expect.equals(null, --nullC()?.v); /// 13: ok + { C c = new C(1); Expect.equals(0, --c?.v); Expect.equals(0, c.v); } /// 14: ok // --C?.v is equivalent to C?.v -= 1. - { C.staticInt = 1; Expect.equals(0, --C?.staticInt); Expect.equals(0, C.staticInt); } //# 35: ok - { h.C.staticInt = 1; Expect.equals(0, --h.C?.staticInt); Expect.equals(0, h.C.staticInt); } //# 36: ok + { C.staticInt = 1; Expect.equals(0, --C?.staticInt); Expect.equals(0, C.staticInt); } /// 35: ok + { h.C.staticInt = 1; Expect.equals(0, --h.C?.staticInt); Expect.equals(0, h.C.staticInt); } /// 36: ok // The static type of --e1?.v is the same as the static type of e1.v - 1. - { D d = new D(new E()); F f = --d?.v; Expect.identical(d.v, f); } //# 15: ok - { D d = new D(new E()); H h = --d?.v; Expect.identical(d.v, h); } //# 16: static type warning - { D.staticE = new E(); F f = --D?.staticE; Expect.identical(D.staticE, f); } //# 37: ok - { h.D.staticE = new h.E(); h.F f = --h.D?.staticE; Expect.identical(h.D.staticE, f); } //# 38: ok - { D.staticE = new E(); H h = --D?.staticE; Expect.identical(D.staticE, h); } //# 39: static type warning - { h.D.staticE = new h.E(); h.H hh = --h.D?.staticE; Expect.identical(h.D.staticE, hh); } //# 40: static type warning + { D d = new D(new E()); F f = --d?.v; Expect.identical(d.v, f); } /// 15: ok + { D d = new D(new E()); H h = --d?.v; Expect.identical(d.v, h); } /// 16: static type warning + { D.staticE = new E(); F f = --D?.staticE; Expect.identical(D.staticE, f); } /// 37: ok + { h.D.staticE = new h.E(); h.F f = --h.D?.staticE; Expect.identical(h.D.staticE, f); } /// 38: ok + { D.staticE = new E(); H h = --D?.staticE; Expect.identical(D.staticE, h); } /// 39: static type warning + { h.D.staticE = new h.E(); h.H hh = --h.D?.staticE; Expect.identical(h.D.staticE, hh); } /// 40: static type warning } diff --git a/tests/language/const_conditional_test.dart b/tests/language/const_conditional_test.dart index bae4396a66d..f2ed35d6b53 100644 --- a/tests/language/const_conditional_test.dart +++ b/tests/language/const_conditional_test.dart @@ -22,35 +22,35 @@ var nonConst = true; const zeroConst = 0; const cond1 = trueConst ? const0 : const1; -const cond1a = trueConst ? nonConst : const1; //# 01: compile-time error -const cond1b = trueConst ? const0 : nonConst; //# 02: compile-time error +const cond1a = trueConst ? nonConst : const1; /// 01: compile-time error +const cond1b = trueConst ? const0 : nonConst; /// 02: compile-time error const cond2 = falseConst ? const0 : const1; -const cond2a = falseConst ? nonConst : const1; //# 03: compile-time error -const cond2b = falseConst ? const0 : nonConst; //# 04: compile-time error +const cond2a = falseConst ? nonConst : const1; /// 03: compile-time error +const cond2b = falseConst ? const0 : nonConst; /// 04: compile-time error -const cond3 = nonConst ? const0 : const1; //# 05: compile-time error -const cond3a = nonConst ? nonConst : const1; //# 06: compile-time error -const cond3b = nonConst ? const0 : nonConst; //# 07: compile-time error +const cond3 = nonConst ? const0 : const1; /// 05: compile-time error +const cond3a = nonConst ? nonConst : const1; /// 06: compile-time error +const cond3b = nonConst ? const0 : nonConst; /// 07: compile-time error -const cond4 = zeroConst ? const0 : const1; //# 08: compile-time error -const cond4a = zeroConst ? nonConst : const1; //# 09: compile-time error -const cond4b = zeroConst ? const0 : nonConst; //# 10: compile-time error +const cond4 = zeroConst ? const0 : const1; /// 08: compile-time error +const cond4a = zeroConst ? nonConst : const1; /// 09: compile-time error +const cond4b = zeroConst ? const0 : nonConst; /// 10: compile-time error void main() { Expect.identical(var0, cond1); - Expect.identical(nonConst, cond1a); //# 01: continued - Expect.identical(var0, cond1b); //# 02: continued + Expect.identical(nonConst, cond1a); /// 01: continued + Expect.identical(var0, cond1b); /// 02: continued Expect.identical(var1, cond2); - Expect.identical(var1, cond2a); //# 03: continued - Expect.identical(nonConst, cond2b); //# 04: continued + Expect.identical(var1, cond2a); /// 03: continued + Expect.identical(nonConst, cond2b); /// 04: continued - Expect.identical(var0, cond3); // //# 05: continued - Expect.identical(nonConst, cond3a); //# 06: continued - Expect.identical(var0, cond3b); //# 07: continued + Expect.identical(var0, cond3); // /// 05: continued + Expect.identical(nonConst, cond3a); /// 06: continued + Expect.identical(var0, cond3b); /// 07: continued - Expect.identical(var1, cond4); // //# 08: continued - Expect.identical(var1, cond4a); //# 09: continued - Expect.identical(nonConst, cond4b); //# 10: continued + Expect.identical(var1, cond4); // /// 08: continued + Expect.identical(var1, cond4a); /// 09: continued + Expect.identical(nonConst, cond4b); /// 10: continued } \ No newline at end of file diff --git a/tests/language/const_constructor2_test.dart b/tests/language/const_constructor2_test.dart index fe42eaf7c4e..13358891dcc 100644 --- a/tests/language/const_constructor2_test.dart +++ b/tests/language/const_constructor2_test.dart @@ -48,31 +48,31 @@ class G implements F { main() { const A a = const B(); - const C c1 = const C(a); //# 01: ok - const C c2 = const C.optional(a); //# 02: ok - const C c3 = const C.named(a: a); //# 03: ok - const C c4 = const C.untyped(a); //# 04: ok - const C c5 = const C.subtyped(a); //# 05: ok - const C c5m = const C.redirecting(a); //# 06: ok + const C c1 = const C(a); /// 01: ok + const C c2 = const C.optional(a); /// 02: ok + const C c3 = const C.named(a: a); /// 03: ok + const C c4 = const C.untyped(a); /// 04: ok + const C c5 = const C.subtyped(a); /// 05: ok + const C c5m = const C.redirecting(a); /// 06: ok - const C c6 = const C(a); //# 07: ok - const C c7 = const C.optional(a); //# 08: ok - const C c8 = const C.named(a: a); //# 09: ok - const C c9 = const C.untyped(a); //# 10: ok - const C c10 = const C.subtyped(a); //# 11: ok - const C c10m = const C.redirecting(a); //# 12: ok + const C c6 = const C(a); /// 07: ok + const C c7 = const C.optional(a); /// 08: ok + const C c8 = const C.named(a: a); /// 09: ok + const C c9 = const C.untyped(a); /// 10: ok + const C c10 = const C.subtyped(a); /// 11: ok + const C c10m = const C.redirecting(a); /// 12: ok - const C c11 = const C(a); //# 13: static type warning, checked mode compile-time error - const C c12 = const C.optional(a); //# 14: static type warning, checked mode compile-time error - const C c13 = const C.named(a: a); //# 15: static type warning, checked mode compile-time error - const C c14 = const C.untyped(a); //# 16: static type warning, checked mode compile-time error - const C c15 = const C.subtyped(a); //# 17: static type warning, checked mode compile-time error - const C c15m = const C.redirecting(a); //# 18: static type warning + const C c11 = const C(a); /// 13: static type warning, checked mode compile-time error + const C c12 = const C.optional(a); /// 14: static type warning, checked mode compile-time error + const C c13 = const C.named(a: a); /// 15: static type warning, checked mode compile-time error + const C c14 = const C.untyped(a); /// 16: static type warning, checked mode compile-time error + const C c15 = const C.subtyped(a); /// 17: static type warning, checked mode compile-time error + const C c15m = const C.redirecting(a); /// 18: static type warning - const E e1 = const E.redirecting1(0); //# 19: ok - const E e2 = const E.redirecting1(''); //# 20: checked mode compile-time error - const E e3 = const E.redirecting2(0); //# 21: ok - const E e4 = const E.redirecting2(''); //# 22: checked mode compile-time error - const E e5 = const E.redirecting3(0); //# 23: ok - const E e6 = const E.redirecting3(''); //# 24: checked mode compile-time error + const E e1 = const E.redirecting1(0); /// 19: ok + const E e2 = const E.redirecting1(''); /// 20: checked mode compile-time error + const E e3 = const E.redirecting2(0); /// 21: ok + const E e4 = const E.redirecting2(''); /// 22: checked mode compile-time error + const E e5 = const E.redirecting3(0); /// 23: ok + const E e6 = const E.redirecting3(''); /// 24: checked mode compile-time error } \ No newline at end of file diff --git a/tests/language/const_constructor3_test.dart b/tests/language/const_constructor3_test.dart index 0a13ca70e89..2f1353aa27f 100644 --- a/tests/language/const_constructor3_test.dart +++ b/tests/language/const_constructor3_test.dart @@ -11,14 +11,14 @@ class D extends C { const D(var d) : super(d); } -const c = const C(0.0); //# 01: ok -const d = const C(0); //# 02: static type warning, checked mode compile-time error -const e = const D(0.0); //# 03: ok -const f = const D(0); //# 04: checked mode compile-time error +const c = const C(0.0); /// 01: ok +const d = const C(0); /// 02: static type warning, checked mode compile-time error +const e = const D(0.0); /// 03: ok +const f = const D(0); /// 04: checked mode compile-time error main() { - print(c); //# 01: continued - print(d); //# 02: continued - print(e); //# 03: continued - print(f); //# 04: continued + print(c); /// 01: continued + print(d); /// 02: continued + print(e); /// 03: continued + print(f); /// 04: continued } \ No newline at end of file diff --git a/tests/language/const_constructor_mixin2_test.dart b/tests/language/const_constructor_mixin2_test.dart index f323b5a33b9..558014bf07e 100644 --- a/tests/language/const_constructor_mixin2_test.dart +++ b/tests/language/const_constructor_mixin2_test.dart @@ -11,12 +11,12 @@ class A { } class B extends A - with Mixin // //# 01: compile-time error + with Mixin // /// 01: compile-time error { const B(foo) : super(foo); } main() { var a = const B(42); - a.nonFinalField = 54; //# 01: continued + a.nonFinalField = 54; /// 01: continued } diff --git a/tests/language/const_constructor_mixin3_test.dart b/tests/language/const_constructor_mixin3_test.dart index 0e46fe3c034..c81b7d3ecf6 100644 --- a/tests/language/const_constructor_mixin3_test.dart +++ b/tests/language/const_constructor_mixin3_test.dart @@ -10,7 +10,7 @@ class A { } class B extends A - with Mixin //# 01: compile-time error + with Mixin /// 01: compile-time error { const B(); } diff --git a/tests/language/const_constructor_mixin_test.dart b/tests/language/const_constructor_mixin_test.dart index 29664b5a328..135828202ab 100644 --- a/tests/language/const_constructor_mixin_test.dart +++ b/tests/language/const_constructor_mixin_test.dart @@ -10,7 +10,7 @@ class A { } class B extends A - with Mixin // //# 01: compile-time error + with Mixin // /// 01: compile-time error { const B(foo) : super(foo); } diff --git a/tests/language/const_constructor_nonconst_field_test.dart b/tests/language/const_constructor_nonconst_field_test.dart index 6dab9fd1389..9571a408a13 100644 --- a/tests/language/const_constructor_nonconst_field_test.dart +++ b/tests/language/const_constructor_nonconst_field_test.dart @@ -5,7 +5,7 @@ import "package:expect/expect.dart"; class A { - final int i = f(); //# 01: compile-time error + final int i = f(); /// 01: compile-time error final int j = 1; const A(); } diff --git a/tests/language/const_constructor_super_test.dart b/tests/language/const_constructor_super_test.dart index 2b5adb30418..faf0418ba07 100644 --- a/tests/language/const_constructor_super_test.dart +++ b/tests/language/const_constructor_super_test.dart @@ -15,17 +15,17 @@ class B extends A { B(x) : b = x + 1, super(x); // Const constructor cannot call non-const super constructor. - const B.zerofive() : b = 0, super(5); // //# 01: compile-time error + const B.zerofive() : b = 0, super(5); // /// 01: compile-time error } class C extends A { C() : super(0); // Implicit call to non-const constructor A(x). - const C.named(x); // //# 02: compile-time error + const C.named(x); // /// 02: compile-time error } main() { - var b = new B.zerofive(); // //# 01: continued + var b = new B.zerofive(); // /// 01: continued var b1 = new B(0); - var c = new C.named(""); // //# 02: continued + var c = new C.named(""); // /// 02: continued } diff --git a/tests/language/const_constructor_syntax_test.dart b/tests/language/const_constructor_syntax_test.dart index f4ae9aac32b..4dabdeec47b 100644 --- a/tests/language/const_constructor_syntax_test.dart +++ b/tests/language/const_constructor_syntax_test.dart @@ -3,10 +3,10 @@ // BSD-style license that can be found in the LICENSE file. main() { - var c0 = const C0(); //# 01: compile-time error - var i0 = const I0(); //# 02: compile-time error + var c0 = const C0(); /// 01: compile-time error + var i0 = const I0(); /// 02: compile-time error var c1 = const C1(); - var c2 = const C2(); //# 03: compile-time error + var c2 = const C2(); /// 03: compile-time error var c3 = const C3(); } @@ -20,7 +20,7 @@ class C0 implements I0 { class C1 { const C1(); - var modifiable; //# 04: compile-time error + var modifiable; /// 04: compile-time error } class C2 { @@ -29,7 +29,7 @@ class C2 { class C3 { const C3() - : field = new C0() //# 05: compile-time error + : field = new C0() /// 05: compile-time error ; final field = null; } diff --git a/tests/language/const_constructor_test.dart b/tests/language/const_constructor_test.dart index ae84d733d70..94dbaee311a 100644 --- a/tests/language/const_constructor_test.dart +++ b/tests/language/const_constructor_test.dart @@ -13,5 +13,5 @@ class A { main() { Expect.equals(42, (const A.named()).x); Expect.equals(42, (new A.named()).x); - const A(); //# 01: compile-time error + const A(); /// 01: compile-time error } diff --git a/tests/language/const_dynamic_type_literal_test.dart b/tests/language/const_dynamic_type_literal_test.dart index e35eea2164f..a1be0f34420 100644 --- a/tests/language/const_dynamic_type_literal_test.dart +++ b/tests/language/const_dynamic_type_literal_test.dart @@ -11,7 +11,7 @@ const d = dynamic; const i = int; void main() { - Expect.isTrue(identical(d, dynamic)); //# 01: ok - Expect.equals(1, const { d: 1, d: 2 }.length); //# 02: static type warning - Expect.equals(2, const { d: 1, i: 2 }.length); //# 03: ok + Expect.isTrue(identical(d, dynamic)); /// 01: ok + Expect.equals(1, const { d: 1, d: 2 }.length); /// 02: static type warning + Expect.equals(2, const { d: 1, i: 2 }.length); /// 03: ok } diff --git a/tests/language/const_error_multiply_initialized_test.dart b/tests/language/const_error_multiply_initialized_test.dart index 104bed70c61..896b1a31453 100644 --- a/tests/language/const_error_multiply_initialized_test.dart +++ b/tests/language/const_error_multiply_initialized_test.dart @@ -14,15 +14,15 @@ import "package:expect/expect.dart"; class C { final x = 1; - const C() : x = 2; //# 01: compile-time error - const C() : x = 2; //# 02: static type warning - const C(this.x); //# 03: compile-time error - const C(this.x); //# 04: static type warning + const C() : x = 2; /// 01: compile-time error + const C() : x = 2; /// 02: static type warning + const C(this.x); /// 03: compile-time error + const C(this.x); /// 04: static type warning } main() { - const C(); //# 01: continued - Expect.throws(() => new C()); //# 02: continued - const C(2); //# 03: continued - Expect.throws(() => new C(2)); //# 04: continued + const C(); /// 01: continued + Expect.throws(() => new C()); /// 02: continued + const C(2); /// 03: continued + Expect.throws(() => new C(2)); /// 04: continued } diff --git a/tests/language/const_evaluation_test.dart b/tests/language/const_evaluation_test.dart index fafbb213217..acfb66aef30 100644 --- a/tests/language/const_evaluation_test.dart +++ b/tests/language/const_evaluation_test.dart @@ -38,9 +38,9 @@ class C { Expect.equals(instance_var, local_const); Expect.equals(local_const, local_final); Expect.equals(local_final, local_var); - var metadata = reflectClass(C).metadata[0].reflectee; //# 01: ok - Expect.equals(top_const, metadata); // //# 01: continued - Expect.equals(local_var, metadata); // //# 01: continued + var metadata = reflectClass(C).metadata[0].reflectee; /// 01: ok + Expect.equals(top_const, metadata); // /// 01: continued + Expect.equals(local_var, metadata); // /// 01: continued } } diff --git a/tests/language/const_factory_with_body_test.dart b/tests/language/const_factory_with_body_test.dart index 1c6a74e1257..dea62482ad5 100644 --- a/tests/language/const_factory_with_body_test.dart +++ b/tests/language/const_factory_with_body_test.dart @@ -5,9 +5,9 @@ // Tests that a "const factory" with body produces a compile-time error. class ConstFactoryWithBody { - const factory ConstFactoryWithBody.one() { } // //# 01: compile-time error + const factory ConstFactoryWithBody.one() { } // /// 01: compile-time error } main() { - const ConstFactoryWithBody.one(); // //# 01: continued + const ConstFactoryWithBody.one(); // /// 01: continued } diff --git a/tests/language/const_for_in_variable_test.dart b/tests/language/const_for_in_variable_test.dart index 7298de9a68e..1b810428993 100644 --- a/tests/language/const_for_in_variable_test.dart +++ b/tests/language/const_for_in_variable_test.dart @@ -4,8 +4,8 @@ main() { for( - const // //# 01: compile-time error - final // //# 02: ok + const // /// 01: compile-time error + final // /// 02: ok int x in const [1, 2, 3]) { break; } diff --git a/tests/language/const_getter_test.dart b/tests/language/const_getter_test.dart index 487dcd99bf1..97717e89fae 100644 --- a/tests/language/const_getter_test.dart +++ b/tests/language/const_getter_test.dart @@ -9,11 +9,11 @@ import 'package:expect/expect.dart'; class C { const C(); - const //# 01: compile-time error + const /// 01: compile-time error get x => 1; } -const //# 02: compile-time error +const /// 02: compile-time error get y => 2; main() { diff --git a/tests/language/const_init2_test.dart b/tests/language/const_init2_test.dart index fa68e4a7431..e6e1c4eb985 100644 --- a/tests/language/const_init2_test.dart +++ b/tests/language/const_init2_test.dart @@ -2,10 +2,10 @@ // 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. -const double c = 0.0; //# 01: ok -const double d = 0; //# 02: static type warning, checked mode compile-time error +const double c = 0.0; /// 01: ok +const double d = 0; /// 02: static type warning, checked mode compile-time error main() { - print(c); //# 01: continued - print(d); //# 02: continued + print(c); /// 01: continued + print(d); /// 02: continued } \ No newline at end of file diff --git a/tests/language/const_instance_field_test.dart b/tests/language/const_instance_field_test.dart index 6fc24937b99..5724c170474 100644 --- a/tests/language/const_instance_field_test.dart +++ b/tests/language/const_instance_field_test.dart @@ -5,7 +5,7 @@ // Test that const instance fields are compile-time errors. class C { - const field = 0; //# 01: compile-time error + const field = 0; /// 01: compile-time error } void main() { diff --git a/tests/language/const_map2_test.dart b/tests/language/const_map2_test.dart index 16c873c42ab..f7e11027bae 100644 --- a/tests/language/const_map2_test.dart +++ b/tests/language/const_map2_test.dart @@ -11,7 +11,7 @@ class A { class B implements A { const B(); - operator ==(o) => true; // //# 00: compile-time error + operator ==(o) => true; // /// 00: compile-time error } @NoInline() @AssumeDynamic() diff --git a/tests/language/const_map3_test.dart b/tests/language/const_map3_test.dart index df3f5d08b9e..e0d27fe7af7 100644 --- a/tests/language/const_map3_test.dart +++ b/tests/language/const_map3_test.dart @@ -11,7 +11,7 @@ class A { class B implements A { const B(); - operator ==(o) => true; // //# 00: compile-time error + operator ==(o) => true; // /// 00: compile-time error } main() { diff --git a/tests/language/const_native_factory_test.dart b/tests/language/const_native_factory_test.dart index a33d48762fa..e6592a4e382 100644 --- a/tests/language/const_native_factory_test.dart +++ b/tests/language/const_native_factory_test.dart @@ -5,7 +5,7 @@ class Cake { final name; const Cake(this.name); - const factory BakeMeACake() native "Cake_BakeMeACake"; // //# 01: compile-time error + const factory BakeMeACake() native "Cake_BakeMeACake"; // /// 01: compile-time error } main() { diff --git a/tests/language/const_objects_are_immutable_test.dart b/tests/language/const_objects_are_immutable_test.dart index 8028818d2af..eb32b400e68 100644 --- a/tests/language/const_objects_are_immutable_test.dart +++ b/tests/language/const_objects_are_immutable_test.dart @@ -24,6 +24,6 @@ main() { Expect.equals(1, a1.x); A a2 = const A(1, 2); - Expect.throws(() => a2.x = 499); //# 01: static type warning + Expect.throws(() => a2.x = 499); /// 01: static type warning Expect.equals(1, a2.x); } diff --git a/tests/language/const_switch2_test.dart b/tests/language/const_switch2_test.dart index 77638c0a784..9262bbefa71 100644 --- a/tests/language/const_switch2_test.dart +++ b/tests/language/const_switch2_test.dart @@ -7,8 +7,8 @@ import 'package:expect/expect.dart'; int main() { var a = [1,2,3][2]; switch (a) { - case 0.0: // //# 01: compile-time error - print("illegal"); // //# 01: continued + case 0.0: // /// 01: compile-time error + print("illegal"); // /// 01: continued case 1: print("OK"); } diff --git a/tests/language/const_switch_test.dart b/tests/language/const_switch_test.dart index 801288b5d4b..94be12c0cdd 100644 --- a/tests/language/const_switch_test.dart +++ b/tests/language/const_switch_test.dart @@ -15,10 +15,10 @@ const c3 = const C(0.5 + 0.5); const c4 = const C(1); main() { - Expect.equals('0.0', test(c1)); //# 01: ok - Expect.equals('0', test(c2)); // //# 02: ok - Expect.equals('1.0', test(c3)); //# 03: ok - Expect.equals('1', test(c4)); // //# 04: ok + Expect.equals('0.0', test(c1)); /// 01: ok + Expect.equals('0', test(c2)); // /// 02: ok + Expect.equals('1.0', test(c3)); /// 03: ok + Expect.equals('1', test(c4)); // /// 04: ok } String test(C c) { diff --git a/tests/language/const_syntax_test.dart b/tests/language/const_syntax_test.dart index 74c90cfb3d2..112741c85c8 100644 --- a/tests/language/const_syntax_test.dart +++ b/tests/language/const_syntax_test.dart @@ -6,45 +6,45 @@ import "package:expect/expect.dart"; main() { const f0 = 42; - const f1; //# 01: compile-time error + const f1; /// 01: compile-time error const int f2 = 87; - const int f3; //# 02: compile-time error + const int f3; /// 02: compile-time error Expect.equals(42, f0); Expect.equals(87, f2); Expect.equals(42, F0); - Expect.equals(null, F1); //# 03: compile-time error + Expect.equals(null, F1); /// 03: compile-time error Expect.equals(87, F2); - Expect.equals(null, F3); //# 04: compile-time error + Expect.equals(null, F3); /// 04: compile-time error Expect.isTrue(P0 is Point); - Expect.isTrue(P1 is int); // //# 05: compile-time error - Expect.isTrue(P2 is Point); //# 06: compile-time error - Expect.isTrue(P3 is int); // //# 07: compile-time error + Expect.isTrue(P1 is int); // /// 05: compile-time error + Expect.isTrue(P2 is Point); /// 06: compile-time error + Expect.isTrue(P3 is int); // /// 07: compile-time error Expect.isTrue(A0 is int); Expect.isTrue(A1 is int); - Expect.isTrue(A2 is int); //# 08: compile-time error - Expect.isTrue(A3 is int); //# 08: continued + Expect.isTrue(A2 is int); /// 08: compile-time error + Expect.isTrue(A3 is int); /// 08: continued Expect.isTrue(C0.X is C1); - Expect.isTrue(C0.X.x is C1); //# 09: compile-time error + Expect.isTrue(C0.X.x is C1); /// 09: compile-time error Expect.equals("Hello 42", B2); - Expect.equals("42Hello", B3); //# 10: compile-time error + Expect.equals("42Hello", B3); /// 10: compile-time error const cf1 = identical(const Point(1, 2), const Point(1, 2)); - const cf2 = identical(const Point(1, 2), new Point(1, 2)); // //# 11: compile-time error + const cf2 = identical(const Point(1, 2), new Point(1, 2)); // /// 11: compile-time error - var f4 = B4; // //# 12: compile-time error + var f4 = B4; // /// 12: compile-time error var f5 = B5; } const F0 = 42; -const F1; // //# 03: continued +const F1; // /// 03: continued const int F2 = 87; -const int F3; // //# 04: continued +const int F3; // /// 04: continued class Point { final x, y; @@ -55,16 +55,16 @@ class Point { // Check that compile time expressions can include invocations of // user-defined const constructors. const P0 = const Point(0, 0); -const P1 = const Point(0, 0) + 1; //# 05: continued -const P2 = new Point(0, 0); // //# 06: continued -const P3 = new Point(0, 0) + 1; // //# 07: continued +const P1 = const Point(0, 0) + 1; /// 05: continued +const P2 = new Point(0, 0); // /// 06: continued +const P3 = new Point(0, 0) + 1; // /// 07: continued // Check that we cannot have cyclic references in compile time // expressions. const A0 = 42; const A1 = A0 + 1; -const A2 = A3 + 1; //# 08: continued -const A3 = A2 + 1; //# 08: continued +const A2 = A3 + 1; /// 08: continued +const A3 = A2 + 1; /// 08: continued class C0 { static const X = const C1(); @@ -72,7 +72,7 @@ class C0 { class C1 { const C1() - : x = C0.X //# 09: continued + : x = C0.X /// 09: continued ; final x = null; } @@ -81,9 +81,9 @@ class C1 { const B0 = 42; const B1 = "Hello"; const B2 = "$B1 $B0"; -const B3 = B0 + B1; //# 10: continued +const B3 = B0 + B1; /// 10: continued // Check identical. -const B4 = identical(1, new Point(1,2)); // //# 12: compile-time error +const B4 = identical(1, new Point(1,2)); // /// 12: compile-time error const B5 = identical(1, const Point(1,2)); diff --git a/tests/language/const_types_test.dart b/tests/language/const_types_test.dart index 0269eae8bf1..9a4a46a43f4 100644 --- a/tests/language/const_types_test.dart +++ b/tests/language/const_types_test.dart @@ -14,68 +14,68 @@ class Class implements Superclass { use(const []); use(const []); use(const >[]); - use(const >[]); //# 01: static type warning - use(const []); //# 02: static type warning + use(const >[]); /// 01: static type warning + use(const []); /// 02: static type warning use(const {}); - use(const {}); //# 03: static type warning + use(const {}); /// 03: static type warning use(const {}); use(const >{}); - use(const >{}); //# 04: static type warning - use(const {}); //# 05: static type warning + use(const >{}); /// 04: static type warning + use(const {}); /// 05: static type warning use(const Class()); use(const Class()); - use(const Class()); //# 06: static type warning - use(const Class()); //# 07: compile-time error - use(const Class>()); //# 08: compile-time error + use(const Class()); /// 06: static type warning + use(const Class()); /// 07: compile-time error + use(const Class>()); /// 08: compile-time error - use(const Unresolved()); //# 09: compile-time error - use(const Unresolved()); //# 10: compile-time error - use(const prefix.Unresolved()); //# 11: compile-time error - use(const prefix.Unresolved()); //# 12: compile-time error + use(const Unresolved()); /// 09: compile-time error + use(const Unresolved()); /// 10: compile-time error + use(const prefix.Unresolved()); /// 11: compile-time error + use(const prefix.Unresolved()); /// 12: compile-time error use(const Class.named()); use(const Class.named()); - use(const Class.named()); //# 13: static type warning - use(const Class.named()); //# 14: compile-time error - use(const Class>.named()); //# 15: compile-time error + use(const Class.named()); /// 13: static type warning + use(const Class.named()); /// 14: compile-time error + use(const Class>.named()); /// 15: compile-time error - use(const Class.nonamed()); //# 16: compile-time error - use(const Class.nonamed()); //# 17: compile-time error - use(const Class.nonamed()); //# 18: compile-time error - use(const Class.nonamed()); //# 19: compile-time error - use(const Class>.nonamed()); //# 20: compile-time error + use(const Class.nonamed()); /// 16: compile-time error + use(const Class.nonamed()); /// 17: compile-time error + use(const Class.nonamed()); /// 18: compile-time error + use(const Class.nonamed()); /// 19: compile-time error + use(const Class>.nonamed()); /// 20: compile-time error - use(const Unresolved.named()); //# 21: compile-time error - use(const Unresolved.named()); //# 22: compile-time error + use(const Unresolved.named()); /// 21: compile-time error + use(const Unresolved.named()); /// 22: compile-time error } } class Superclass { - const factory Superclass() = Unresolved; //# 23: compile-time error - const factory Superclass() = Unresolved; //# 24: compile-time error - const factory Superclass() = Unresolved.named; //# 25: compile-time error - const factory Superclass() = Unresolved.named; //# 26: compile-time error + const factory Superclass() = Unresolved; /// 23: compile-time error + const factory Superclass() = Unresolved; /// 24: compile-time error + const factory Superclass() = Unresolved.named; /// 25: compile-time error + const factory Superclass() = Unresolved.named; /// 26: compile-time error - const factory Superclass() = prefix.Unresolved; //# 27: compile-time error - const factory Superclass() = prefix.Unresolved; //# 28: compile-time error - const factory Superclass() = prefix.Unresolved.named; //# 29: compile-time error - const factory Superclass() = prefix.Unresolved.named; //# 30: compile-time error + const factory Superclass() = prefix.Unresolved; /// 27: compile-time error + const factory Superclass() = prefix.Unresolved; /// 28: compile-time error + const factory Superclass() = prefix.Unresolved.named; /// 29: compile-time error + const factory Superclass() = prefix.Unresolved.named; /// 30: compile-time error - const factory Superclass() = Class; //# 31: ok - const factory Superclass() = Class; //# 32: ok - const factory Superclass() = Class; //# 33: ok - const factory Superclass() = Class>; //# 34: ok - const factory Superclass() = Class; //# 35: static type warning + const factory Superclass() = Class; /// 31: ok + const factory Superclass() = Class; /// 32: ok + const factory Superclass() = Class; /// 33: ok + const factory Superclass() = Class>; /// 34: ok + const factory Superclass() = Class; /// 35: static type warning - const factory Superclass() = Class.named; //# 36: ok - const factory Superclass() = Class.named; //# 37: ok - const factory Superclass() = Class.named; //# 38: ok - const factory Superclass() = Class>.named; //# 39: ok - const factory Superclass() = Class.named; //# 40: static type warning + const factory Superclass() = Class.named; /// 36: ok + const factory Superclass() = Class.named; /// 37: ok + const factory Superclass() = Class.named; /// 38: ok + const factory Superclass() = Class>.named; /// 39: ok + const factory Superclass() = Class.named; /// 40: static type warning - const factory Superclass() = T; //# 41: compile-time error + const factory Superclass() = T; /// 41: compile-time error } void main() { diff --git a/tests/language/constant_locals_test.dart b/tests/language/constant_locals_test.dart index f506a02729f..bd852407f9e 100644 --- a/tests/language/constant_locals_test.dart +++ b/tests/language/constant_locals_test.dart @@ -7,13 +7,13 @@ import "package:expect/expect.dart"; void main() { - const c1; //# 01: compile-time error + const c1; /// 01: compile-time error const c2 = 0; - const c3 = field; //# 02: compile-time error - const c4 = finalField; //# 03: compile-time error + const c3 = field; /// 02: compile-time error + const c4 = finalField; /// 03: compile-time error const c5 = constField; - const c6 = method(); //# 04: compile-time error - const c7 = new Class(); //# 05: compile-time error + const c6 = method(); /// 04: compile-time error + const c7 = new Class(); /// 05: compile-time error const c8 = const Class(); } diff --git a/tests/language/constant_type_literal_test.dart b/tests/language/constant_type_literal_test.dart index 6243a7d2956..a63ec1b60b4 100644 --- a/tests/language/constant_type_literal_test.dart +++ b/tests/language/constant_type_literal_test.dart @@ -7,7 +7,7 @@ class C { void m() { const List lst = const [ - T //# 01: compile-time error + T /// 01: compile-time error ]; } } diff --git a/tests/language/constructor10_test.dart b/tests/language/constructor10_test.dart index b6f94bd324e..2906632b5d6 100644 --- a/tests/language/constructor10_test.dart +++ b/tests/language/constructor10_test.dart @@ -11,17 +11,17 @@ class A { } class B extends A { - /* // //# 00: compile-time error + /* // /// 00: compile-time error B() : super(null); - */ // //# 00: continued + */ // /// 00: continued } // ========== class Y extends A { - /* // //# 01: compile-time error + /* // /// 01: compile-time error Y() : super(null); - */ // //# 01: continued + */ // /// 01: continued } class Z extends Y { @@ -31,9 +31,9 @@ class Z extends Y { // ============== class G extends A { - /* // //# 02: compile-time error + /* // /// 02: compile-time error G() : super(null); - */ // //# 02: continued + */ // /// 02: continued } class H extends G { diff --git a/tests/language/constructor9_test.dart b/tests/language/constructor9_test.dart index 2e2da6ea2e6..51142699b48 100644 --- a/tests/language/constructor9_test.dart +++ b/tests/language/constructor9_test.dart @@ -8,7 +8,7 @@ class Klass { Klass(var v): field_ = v { } - final uninitializedFinalField_; // //# 01: static type warning + final uninitializedFinalField_; // /// 01: static type warning var field_; } diff --git a/tests/language/constructor_call_as_function_test.dart b/tests/language/constructor_call_as_function_test.dart index 5467c0789c1..cbb38ef5df6 100644 --- a/tests/language/constructor_call_as_function_test.dart +++ b/tests/language/constructor_call_as_function_test.dart @@ -12,5 +12,5 @@ class Point { } main() { - Point p = Point(1, 2); // //# 01: static type warning, runtime error + Point p = Point(1, 2); // /// 01: static type warning, runtime error } diff --git a/tests/language/constructor_duplicate_final_test.dart b/tests/language/constructor_duplicate_final_test.dart index e51f3124273..0c2169926cf 100644 --- a/tests/language/constructor_duplicate_final_test.dart +++ b/tests/language/constructor_duplicate_final_test.dart @@ -8,17 +8,17 @@ class Class { final f = 10; - Class(v) : f = v; // //# 01: runtime error, static type warning + Class(v) : f = v; // /// 01: runtime error, static type warning - Class(this.f); // //# 02: runtime error, static type warning + Class(this.f); // /// 02: runtime error, static type warning // If a field is initialized multiple times in the initializer // list, it's a compile time error. - Class(this.f) : f = 0; // //# 03: compile-time error + Class(this.f) : f = 0; // /// 03: compile-time error } main() { - new Class(5); // //# 01: continued - new Class(5); // //# 02: continued - new Class(5); // //# 03: continued + new Class(5); // /// 01: continued + new Class(5); // /// 02: continued + new Class(5); // /// 03: continued } diff --git a/tests/language/constructor_duplicate_initializers_test.dart b/tests/language/constructor_duplicate_initializers_test.dart index ed01c1674bf..9748beec1c7 100644 --- a/tests/language/constructor_duplicate_initializers_test.dart +++ b/tests/language/constructor_duplicate_initializers_test.dart @@ -8,16 +8,16 @@ class Class { Class(var v) : field_ = v // Test against duplicate final field initializaion in initializing list. - , field_ = 2 // //# 01: compile-time error + , field_ = 2 // /// 01: compile-time error ; Class.field(this.field_) // Test against duplicate final field initialization between initializing // formals and initializer list. - : field_ = 2 // //# 02: compile-time error + : field_ = 2 // /// 02: compile-time error ; // Test against duplicate final field initialization in initializing formals. Class.two_fields(this.field_ - , this.field_ //# 03: compile-time error + , this.field_ /// 03: compile-time error ); final field_; } @@ -26,6 +26,6 @@ main() { new Class(42); new Class.field(42); new Class.two_fields(42 - , 42 // //# 03: continued + , 42 // /// 03: continued ); } diff --git a/tests/language/constructor_initializer_test.dart b/tests/language/constructor_initializer_test.dart index cae3ca1028c..a4dec3f107d 100644 --- a/tests/language/constructor_initializer_test.dart +++ b/tests/language/constructor_initializer_test.dart @@ -11,7 +11,7 @@ class A { // is remembered in the constructor body. Expect.equals(x, _x + 1); Expect.equals(y, _y + 1); - Expect.isFalse(?y); // //# 01: compile-time error + Expect.isFalse(?y); // /// 01: compile-time error } } diff --git a/tests/language/constructor_name_test.dart b/tests/language/constructor_name_test.dart index 7559d2eaf46..93742a6e636 100644 --- a/tests/language/constructor_name_test.dart +++ b/tests/language/constructor_name_test.dart @@ -3,14 +3,14 @@ // BSD-style license that can be found in the LICENSE file. class Foo { - Bar.Foo(); //# 01: compile-time error - factory Bar(); //# 02: compile-time error - factory Bar.Baz(); //# 03: compile-time error + Bar.Foo(); /// 01: compile-time error + factory Bar(); /// 02: compile-time error + factory Bar.Baz(); /// 03: compile-time error } void main() { new Foo(); - new Foo.Foo(); //# 01: continued - new Foo.Baz(); //# 03: continued + new Foo.Foo(); /// 01: continued + new Foo.Baz(); /// 03: continued } \ No newline at end of file diff --git a/tests/language/constructor_named_arguments_test.dart b/tests/language/constructor_named_arguments_test.dart index e04a52a9ca5..42de7a8a206 100644 --- a/tests/language/constructor_named_arguments_test.dart +++ b/tests/language/constructor_named_arguments_test.dart @@ -23,7 +23,7 @@ class X { X({a: 'defa', b: 'defb'}) : this.i = a, this.j = b; X.foo() : this(b: 1, a: 2); X.bar() : this( - 1, // //# 01: static type warning, runtime error + 1, // /// 01: static type warning, runtime error a: 2); X.baz() : this(a: 1, b: 2); X.qux() : this(b: 2); diff --git a/tests/language/constructor_redirect2_test.dart b/tests/language/constructor_redirect2_test.dart index 47e46b2dd0a..aec05d2113b 100644 --- a/tests/language/constructor_redirect2_test.dart +++ b/tests/language/constructor_redirect2_test.dart @@ -8,22 +8,22 @@ class A { A(this.x) {} // Redirecting constructor must not have a function body. - A.illegalBody(x) : this(3) {} // //# 01: compile-time error + A.illegalBody(x) : this(3) {} // /// 01: compile-time error // Redirecting constructor must not initialize any fields. - A.illegalInit() : this(3), x = 5; // //# 02: compile-time error + A.illegalInit() : this(3), x = 5; // /// 02: compile-time error // Redirecting constructor must not have initializing formal parameters. - A.illegalFormal(this.x) : this(3); // //# 03: compile-time error + A.illegalFormal(this.x) : this(3); // /// 03: compile-time error // Redirection constructors must not call super constructor. - A.illegalSuper() : this(3), super(3); // //# 04: compile-time error + A.illegalSuper() : this(3), super(3); // /// 04: compile-time error } main() { new A(3); - new A.illegalBody(10); // //# 01: continued - new A.illegalInit(); // //# 02: continued - new A.illegalFormal(10); // //# 03: continued - new A.illegalSuper(); // //# 04: continued + new A.illegalBody(10); // /// 01: continued + new A.illegalInit(); // /// 02: continued + new A.illegalFormal(10); // /// 03: continued + new A.illegalSuper(); // /// 04: continued } diff --git a/tests/language/constructor_redirect_test.dart b/tests/language/constructor_redirect_test.dart index 3b0e070f678..1667493d574 100644 --- a/tests/language/constructor_redirect_test.dart +++ b/tests/language/constructor_redirect_test.dart @@ -19,7 +19,7 @@ class A { // staticFun isn't really a static function and should cause a // compile-time error. static - moreStaticFun() {} //# 01: compile-time error + moreStaticFun() {} /// 01: compile-time error int staticFun(int v1, int v2) { return v1 * v2; } diff --git a/tests/language/constructor_return_test.dart b/tests/language/constructor_return_test.dart index c971ed3f278..4361a53cf89 100644 --- a/tests/language/constructor_return_test.dart +++ b/tests/language/constructor_return_test.dart @@ -10,26 +10,26 @@ class A { int x; A(this.x) { return; } A.test1(this.x) { - return this; // //# 01: compile-time error + return this; // /// 01: compile-time error } A.test2(this.x) { - return null; // //# 02: compile-time error + return null; // /// 02: compile-time error } int foo(int y) => x + y; } class B { - B() => null; // //# 03: compile-time error + B() => null; // /// 03: compile-time error } class C { int value; - C() : value = 1 { return null; } // //# 04: compile-time error + C() : value = 1 { return null; } // /// 04: compile-time error } class D { int value; - D(): value = 1 => null; // //# 05: compile-time error + D(): value = 1 => null; // /// 05: compile-time error } main() { diff --git a/tests/language/covariant_test.dart b/tests/language/covariant_test.dart index 7cd5f64a5c1..f7388fea15a 100644 --- a/tests/language/covariant_test.dart +++ b/tests/language/covariant_test.dart @@ -13,97 +13,97 @@ import 'package:expect/expect.dart'; // Top level field may not have a covariant. // Would be considered a minor (acceptable) bug, if it was accepted here too. -covariant // //# 00: compile-time error +covariant // /// 00: compile-time error int x0; -covariant int covariant; // //# 00b: compile-time error +covariant int covariant; // /// 00b: compile-time error -int covariant; // //# 00c: ok +int covariant; // /// 00c: ok // Getters may never have `covariant`. (Neither on the top-level nor as members) -covariant // //# 01: compile-time error +covariant // /// 01: compile-time error int get x1 => 499; // Top level setters may not have a covariant. // Would be considered a minor (acceptable) bug, if it was accepted here too. void set x2( - covariant //# 02: compile-time error + covariant /// 02: compile-time error int val) {} // Same as above, but with `covariant` in different positions. // The `covariant` is just wrong there. int -covariant // //# 03: compile-time error +covariant // /// 03: compile-time error x3; int -covariant // //# 04: compile-time error +covariant // /// 04: compile-time error get x4 => 499; void set x5( int - covariant //# 05: compile-time error + covariant /// 05: compile-time error val) {} // Same without types. // Since `covariant` is a built-in identifier, it is not allowed here. -covariant x6; // //# 06: compile-time error +covariant x6; // /// 06: compile-time error -covariant covariant; // //# 06b: compile-time error +covariant covariant; // /// 06b: compile-time error // Getters may never have `covariant`. -covariant // //# 07: compile-time error +covariant // /// 07: compile-time error get x7 => 499; // Top level setters may not have a covariant. // Would be considered a minor (acceptable) bug, if it was accepted here too. void set x8( - covariant //# 08: compile-time error + covariant /// 08: compile-time error val) {} // If there is no type, then `covariant` is simply the parameter name: void set x9(covariant) {} // Covariant won't work on return types. -covariant // //# 10: compile-time error +covariant // /// 10: compile-time error int f10() => 499; // Covariant won't work as a return type. -covariant // //# 11: compile-time error +covariant // /// 11: compile-time error f11() => 499; // Covariant should not work on top-level methods. // It's a minor (acceptable) bug to not error out here. int f12( - covariant //# 12: compile-time error + covariant /// 12: compile-time error int x) => 499; // `Covariant` must be in front of the types. int f13( int - covariant //# 13: compile-time error + covariant /// 13: compile-time error x) => 499; // Covariant should not work on top-level methods. // It's a minor (acceptable) bug to not error out here. int f14( - covariant //# 14: compile-time error + covariant /// 14: compile-time error final x) => 499; // `Covariant` must be in front of modifiers. int f15( final - covariant //# 15: compile-time error + covariant /// 15: compile-time error x) => 499; // Covariant should not work on top-level methods. // It's a minor (acceptable) bug to not error out here. int f16( - covariant //# 16: compile-time error + covariant /// 16: compile-time error final int x) => 499; @@ -111,76 +111,76 @@ int f16( // `Covariant` must be in front of modifiers. int f17( final - covariant //# 17: compile-time error + covariant /// 17: compile-time error int x) => 499; // On its own, `covariant` is just a parameter name. int f18(covariant) => covariant; -covariant; // //# 19: compile-time error +covariant; // /// 19: compile-time error // All of the above as statics in a class. class A { // Static fields may not have a covariant. // Would be considered a minor (acceptable) bug, if it was accepted here too. static - covariant // //# 20: compile-time error + covariant // /// 20: compile-time error int x20; - static covariant int covariant // //# 20b: compile-time error + static covariant int covariant // /// 20b: compile-time error - static int covariant; // //# 20c: ok + static int covariant; // /// 20c: ok // Getters may never have `covariant`. static - covariant // //# 21: compile-time error + covariant // /// 21: compile-time error int get x21 => 499; // Getters may never have `covariant`. - covariant // //# 21b: compile-time error + covariant // /// 21b: compile-time error static int get x21b => 499; // Static setters may not have a covariant. // Would be considered a minor (acceptable) bug, if it was accepted here too. static void set x22( - covariant //# 22: compile-time error + covariant /// 22: compile-time error int val) {} // Same as above, but with `covariant` in different positions. // The `covariant` is just wrong there. static int - covariant // //# 23: compile-time error + covariant // /// 23: compile-time error x23; static int - covariant // //# 24: compile-time error + covariant // /// 24: compile-time error get x24 => 499; static void set x25( int - covariant //# 25: compile-time error + covariant /// 25: compile-time error val) {} // Since `covariant` is a built-in identifier, it is not allowed here. - static covariant x26; //# 26: compile-time error - static covariant covariant; //# 26b: compile-time error + static covariant x26; /// 26: compile-time error + static covariant covariant; /// 26b: compile-time error // Getters may never have `covariant`. static - covariant // //# 27: compile-time error + covariant // /// 27: compile-time error get x27 => 499; - covariant // //# 27b: compile-time error + covariant // /// 27b: compile-time error static get x27b => 499; // Static setters may not have a covariant. // Would be considered a minor (acceptable) bug, if it was accepted here too. static void set x28( - covariant //# 28: compile-time error + covariant /// 28: compile-time error val) {} // If there is no type, then `covariant` is simply the parameter name: @@ -188,51 +188,51 @@ class A { // Covariant won't work on return types. static - covariant // //# 30: compile-time error + covariant // /// 30: compile-time error int f30() => 499; - covariant // //# 30b: compile-time error + covariant // /// 30b: compile-time error static int f30b() => 499; // Covariant won't work as a return type. static - covariant // //# 31: compile-time error + covariant // /// 31: compile-time error f31() => 499; - covariant // //# 31b: compile-time error + covariant // /// 31b: compile-time error static f31b() => 499; // Covariant should not work on static methods. // It's a minor (acceptable) bug to not error out here. static int f32( - covariant //# 32: compile-time error + covariant /// 32: compile-time error int x) => 499; // `Covariant` must be in front of the types. static int f33( int - covariant //# 33: compile-time error + covariant /// 33: compile-time error x) => 499; // Covariant should not work on top-level methods. // It's a minor (acceptable) bug to not error out here. static int f34( - covariant //# 34: compile-time error + covariant /// 34: compile-time error final x) => 499; // `Covariant` must be in front of modifiers. static int f35( final - covariant //# 35: compile-time error + covariant /// 35: compile-time error x) => 499; // Covariant should not work on top-level methods. // It's a minor (acceptable) bug to not error out here. static int f36( - covariant //# 36: compile-time error + covariant /// 36: compile-time error final int x) => 499; @@ -240,122 +240,122 @@ class A { // `Covariant` must be in front of modifiers. static int f37( final - covariant //# 37: compile-time error + covariant /// 37: compile-time error int x) => 499; // `Covariant` on its own is just a parameter name. static int f38(covariant) => covariant; - static covariant; // //# 39: compile-time error + static covariant; // /// 39: compile-time error } // All of the above as instance members in a class. class B { - covariant // //# 40: ok + covariant // /// 40: ok int x40; - covariant int covariant; // //# 40b: ok + covariant int covariant; // /// 40b: ok - int covariant; // //# 40c: ok + int covariant; // /// 40c: ok // Getters may never have `covariant`. - covariant // //# 41: compile-time error + covariant // /// 41: compile-time error int get x41 => 499; void set x42( - covariant // //# 42: ok + covariant // /// 42: ok int val) {} // `covariant` in the wrong position. int - covariant // //# 43: compile-time error + covariant // /// 43: compile-time error x43; // `covariant` in the wrong position. int - covariant // //# 44: compile-time error + covariant // /// 44: compile-time error get x44 => 499; void set x45( int - covariant //# 45: compile-time error + covariant /// 45: compile-time error val) {} // Since `covariant` is a built-in identifier, it is not allowed here. - covariant x46; //# 46: compile-time error - covariant covariant; //# 46b: compile-time error + covariant x46; /// 46: compile-time error + covariant covariant; /// 46b: compile-time error // Getters may never have `covariant`. - covariant // //# 47: compile-time error + covariant // /// 47: compile-time error get x47 => 499; void set x48( - covariant // //# 48: ok + covariant // /// 48: ok val) {} // If there is no type, then `covariant` is simply the parameter name: void set x49(covariant) {} // Covariant won't work on return types. - covariant // //# 50: compile-time error + covariant // /// 50: compile-time error int f50() => 499; // Covariant won't work as a return type. - covariant // //# 51: compile-time error + covariant // /// 51: compile-time error f51() => 499; int f52( - covariant // //# 52: ok + covariant // /// 52: ok int x) => 499; // `Covariant` must be in front of the types. int f53( int - covariant //# 53: compile-time error + covariant /// 53: compile-time error x) => 499; int f54( - covariant // //# 54: ok + covariant // /// 54: ok final x) => 499; // `Covariant` must be in front of modifiers. int f55( final - covariant //# 55: compile-time error + covariant /// 55: compile-time error x) => 499; int f56( - covariant // //# 56: ok + covariant // /// 56: ok final int x) => 499; // `Covariant` must be in front of modifiers. int f57( final - covariant //# 57: compile-time error + covariant /// 57: compile-time error int x) => 499; // `Covariant` on its own is just a parameter name. int f58(covariant) => covariant; - covariant; // //# 59: compile-time error + covariant; // /// 59: compile-time error } void use(x) {} main() { x0 = 0; - covariant = 0; // //# 00b: continued - covariant = 0; // //# 00c: continued + covariant = 0; // /// 00b: continued + covariant = 0; // /// 00c: continued use(x1); x2 = 499; use(x3); use(x4); x5 = 42; - x6 = 0; //# 06: continued - covariant = 0; //# 06b: continued + x6 = 0; /// 06: continued + covariant = 0; /// 06b: continued use(x7); x8 = 11; x9 = 12; @@ -368,19 +368,19 @@ main() { use(f16(3)); use(f17(3)); Expect.equals(123, f18(123)); - use(covariant); // //# 19: continued + use(covariant); // /// 19: continued A.x20 = 0; - A.covariant = 0; // //# 20b: continued - A.covariant = 0; // //# 20c: continued + A.covariant = 0; // /// 20b: continued + A.covariant = 0; // /// 20c: continued use(A.x21); use(A.x21b); A.x22 = 499; use(A.x23); use(A.x24); A.x25 = 42; - A.x26 = 0; //# 26: continued - A.covariant = 0; //# 26b: continued + A.x26 = 0; /// 26: continued + A.covariant = 0; /// 26b: continued use(A.x27); use(A.x27b); A.x28 = 11; @@ -395,19 +395,19 @@ main() { use(A.f36(3)); use(A.f37(3)); Expect.equals(1234, A.f38(1234)); - use(A.covariant); // //# 39: continued + use(A.covariant); // /// 39: continued var b = new B(); b.x40 = 0; - b.covariant = 0; // //# 40b: continued - b.covariant = 0; // //# 40c: continued + b.covariant = 0; // /// 40b: continued + b.covariant = 0; // /// 40c: continued use(b.x41); b.x42 = 499; use(b.x43); use(b.x44); b.x45 = 42; - b.x46 = 0; //# 46: continued - b.covariant = 0; //# 46b: continued + b.x46 = 0; /// 46: continued + b.covariant = 0; /// 46b: continued use(b.x47); b.x48 = 11; b.x49 = 12; @@ -420,5 +420,5 @@ main() { use(b.f56(3)); use(b.f57(3)); Expect.equals(12345, b.f58(12345)); - use(B.covariant); // //# 59: continued + use(B.covariant); // /// 59: continued } \ No newline at end of file diff --git a/tests/language/crash_6725_test.dart b/tests/language/crash_6725_test.dart index 54de50b7d48..420111f5af6 100644 --- a/tests/language/crash_6725_test.dart +++ b/tests/language/crash_6725_test.dart @@ -6,8 +6,8 @@ library crash_6725; -part 'crash_6725_part.dart'; //# 01: static type warning +part 'crash_6725_part.dart'; /// 01: static type warning main() { - test(); //# 01: continued + test(); /// 01: continued } diff --git a/tests/language/create_unresolved_type_test.dart b/tests/language/create_unresolved_type_test.dart index c9fda0e1280..558a14a844e 100644 --- a/tests/language/create_unresolved_type_test.dart +++ b/tests/language/create_unresolved_type_test.dart @@ -3,5 +3,5 @@ // BSD-style license that can be found in the LICENSE file. main() { - new F(); // //# 01: runtime error, static type warning + new F(); // /// 01: runtime error, static type warning } diff --git a/tests/language/cyclic_class_member_test.dart b/tests/language/cyclic_class_member_test.dart index d33d8966b56..63c9651c90c 100644 --- a/tests/language/cyclic_class_member_test.dart +++ b/tests/language/cyclic_class_member_test.dart @@ -5,7 +5,7 @@ // Test that class with a cyclic hierarchy doesn't cause a loop in dart2js. class A - extends A //# 01: compile-time error + extends A /// 01: compile-time error { // When checking that foo isn't overriding an instance method in the // superclass, dart2js might loop. diff --git a/tests/language/cyclic_constructor_test.dart b/tests/language/cyclic_constructor_test.dart index 5a83edd9b20..0116265939a 100644 --- a/tests/language/cyclic_constructor_test.dart +++ b/tests/language/cyclic_constructor_test.dart @@ -5,7 +5,7 @@ class A { A.a() : this.b(); A.b() - : this.a() // //# 01: compile-time error + : this.a() // /// 01: compile-time error ; A.c() : this.b(); } diff --git a/tests/language/cyclic_metadata_test.dart b/tests/language/cyclic_metadata_test.dart index d36b9295b3e..b420ca8aea7 100644 --- a/tests/language/cyclic_metadata_test.dart +++ b/tests/language/cyclic_metadata_test.dart @@ -5,10 +5,10 @@ // Check that metadata on a class 'Super' using subtypes of 'Super' are not // considered as cyclic inheritance or lead to crashes. -@Sub1(0) //# 01: ok +@Sub1(0) /// 01: ok class Super { final field; - @Sub2(1) //# 02: ok + @Sub2(1) /// 02: ok const Super(this.field); } diff --git a/tests/language/cyclic_type_test.dart b/tests/language/cyclic_type_test.dart index 216f1eba4a5..2fc5766ce64 100644 --- a/tests/language/cyclic_type_test.dart +++ b/tests/language/cyclic_type_test.dart @@ -11,21 +11,21 @@ class Base { } // Derived is contractive. -class Derived extends Base> {} // //# 00: ok +class Derived extends Base> {} // /// 00: ok // Derived is contractive. -class Derived extends Base>> {} // //# 01: ok +class Derived extends Base>> {} // /// 01: ok // Derived is non-contractive. -class Derived extends Base>> {} // //# 02: ok +class Derived extends Base>> {} // /// 02: ok // Derived1 and Derived2 are contractive. -class Derived1 extends Base> {} // //# 03: ok -class Derived2 extends Base> {} // //# 03: ok +class Derived1 extends Base> {} // /// 03: ok +class Derived2 extends Base> {} // /// 03: ok // Derived1 and Derived2 are non-contractive. -class Derived1 extends Base> {} // //# 04: ok -class Derived2 extends Base>> {} // //# 04: ok +class Derived1 extends Base> {} // /// 04: ok +class Derived2 extends Base>> {} // /// 04: ok main() { // In the tests below we test that we get "int" and "bool" when calling @@ -34,39 +34,39 @@ main() { // core types so we make sure to handle these specifically in the compiler. var d; - d = new Derived(); // //# 00: continued - Expect.equals("Derived", d.t.toString()); // //# 00: continued - d = new Derived(); // //# 00: continued - Expect.equals("Derived", d.t.toString()); // //# 00: continued - d = new Derived(); // //# 00: continued - Expect.equals("Derived", d.t.toString()); // //# 00: continued + d = new Derived(); // /// 00: continued + Expect.equals("Derived", d.t.toString()); // /// 00: continued + d = new Derived(); // /// 00: continued + Expect.equals("Derived", d.t.toString()); // /// 00: continued + d = new Derived(); // /// 00: continued + Expect.equals("Derived", d.t.toString()); // /// 00: continued - d = new Derived(); // //# 01: continued + d = new Derived(); // /// 01: continued - Expect.equals("Derived>", d.t.toString()); // //# 01: continued - d = new Derived(); // //# 01: continued - Expect.equals("Derived>", d.t.toString()); // //# 01: continued - d = new Derived(); // //# 01: continued - Expect.equals("Derived>", d.t.toString()); // //# 01: continued + Expect.equals("Derived>", d.t.toString()); // /// 01: continued + d = new Derived(); // /// 01: continued + Expect.equals("Derived>", d.t.toString()); // /// 01: continued + d = new Derived(); // /// 01: continued + Expect.equals("Derived>", d.t.toString()); // /// 01: continued - d = new Derived(); // //# 02: continued - Expect.equals("Derived", d.t.toString()); // //# 02: continued - d = new Derived(); // //# 02: continued - Expect.equals("Derived>", d.t.toString()); // //# 02: continued - d = new Derived(); // //# 02: continued - Expect.equals("Derived>", d.t.toString()); // //# 02: continued + d = new Derived(); // /// 02: continued + Expect.equals("Derived", d.t.toString()); // /// 02: continued + d = new Derived(); // /// 02: continued + Expect.equals("Derived>", d.t.toString()); // /// 02: continued + d = new Derived(); // /// 02: continued + Expect.equals("Derived>", d.t.toString()); // /// 02: continued - d = new Derived1(); // //# 03: continued - Expect.equals("Derived2", d.t.toString()); // //# 03: continued - d = new Derived2(); // //# 03: continued - Expect.equals("Derived1", d.t.toString()); // //# 03: continued - d = new Derived2>(); // //# 03: continued - Expect.equals("Derived1>", d.t.toString()); // //# 03: continued + d = new Derived1(); // /// 03: continued + Expect.equals("Derived2", d.t.toString()); // /// 03: continued + d = new Derived2(); // /// 03: continued + Expect.equals("Derived1", d.t.toString()); // /// 03: continued + d = new Derived2>(); // /// 03: continued + Expect.equals("Derived1>", d.t.toString()); // /// 03: continued - d = new Derived1(); // //# 04: continued - Expect.equals("Derived2", d.t.toString()); // //# 04: continued - d = new Derived2(); // //# 04: continued - Expect.equals("Derived1", d.t.toString()); // //# 04: continued - d = new Derived2>(); // //# 04: continued - Expect.equals("Derived1>>", d.t.toString()); // //# 04: continued + d = new Derived1(); // /// 04: continued + Expect.equals("Derived2", d.t.toString()); // /// 04: continued + d = new Derived2(); // /// 04: continued + Expect.equals("Derived1", d.t.toString()); // /// 04: continued + d = new Derived2>(); // /// 04: continued + Expect.equals("Derived1>>", d.t.toString()); // /// 04: continued } diff --git a/tests/language/cyclic_type_variable_test.dart b/tests/language/cyclic_type_variable_test.dart index a6d6118c999..79c2937cfc9 100644 --- a/tests/language/cyclic_type_variable_test.dart +++ b/tests/language/cyclic_type_variable_test.dart @@ -9,14 +9,14 @@ class Base {} class Derived extends Base {} // legal typedef void funcType(T arg); class DerivedFunc extends Base> { } abstract class A { S field; } @@ -26,13 +26,13 @@ abstract class B> { // legal } class C1 { V field; } class C2 implements A { V field; } diff --git a/tests/language/cyclic_typedef_test.dart b/tests/language/cyclic_typedef_test.dart index 1f42e613fa3..c660527612e 100644 --- a/tests/language/cyclic_typedef_test.dart +++ b/tests/language/cyclic_typedef_test.dart @@ -9,47 +9,47 @@ typedef // Cyclic through return type. -A //# 01: compile-time error +A /// 01: compile-time error A // The name of the typedef // Cyclic through type variable bound. - //# 10: compile-time error + /// 10: compile-time error // Cyclic through generic type variable bound. -> //# 11: compile-time error +> /// 11: compile-time error ( // The left parenthesis of the typedef arguments. // Cyclic through parameter type. -A a //# 02: compile-time error +A a /// 02: compile-time error // Cyclic through optional parameter type. -[A a] //# 03: compile-time error +[A a] /// 03: compile-time error // Cyclic through named parameter type. -{A a} //# 04: compile-time error +{A a} /// 04: compile-time error // Cyclic through generic parameter type. -List a //# 05: compile-time error +List a /// 05: compile-time error // Cyclic through return type of function typed parameter. -A f() //# 06: compile-time error +A f() /// 06: compile-time error // Cyclic through parameter type of function typed parameter. -f(A a) //# 07: compile-time error +f(A a) /// 07: compile-time error // Cyclic through another typedef. -B b //# 08: compile-time error +B b /// 08: compile-time error // Cyclic through another more typedefs. -C c //# 09: compile-time error +C c /// 09: compile-time error // Reference through a class is not a cyclic self-reference. -Class c //# 12: ok +Class c /// 12: ok // Reference through a class type bound is not a cyclic self-reference. -Class c //# 13: ok +Class c /// 13: ok ); // The right parenthesis of the typedef arguments. @@ -57,9 +57,9 @@ typedef B(A a); typedef C(B b); class Class - //# 13: continued + /// 13: continued { - A a; //# 12: continued + A a; /// 12: continued } void testA(A a) {} diff --git a/tests/language/default_factory2_test.dart b/tests/language/default_factory2_test.dart index 7eaeb8f97f7..30c097bf48b 100644 --- a/tests/language/default_factory2_test.dart +++ b/tests/language/default_factory2_test.dart @@ -15,5 +15,5 @@ class A implements IA { } main() { - var result = new IA(); // //# 01: static type warning, dynamic type error + var result = new IA(); // /// 01: static type warning, dynamic type error } diff --git a/tests/language/default_factory_test.dart b/tests/language/default_factory_test.dart index 820d741d932..bac3a04b773 100644 --- a/tests/language/default_factory_test.dart +++ b/tests/language/default_factory_test.dart @@ -7,7 +7,7 @@ import "package:expect/expect.dart"; // Dart test program for testing default factories. abstract class Vehicle { - factory Vehicle() = GoogleOne.Vehicle; //# 01: static type warning + factory Vehicle() = GoogleOne.Vehicle; /// 01: static type warning } @@ -31,5 +31,5 @@ class GoogleOne implements SpaceShip { main() { Expect.equals(true, (new Bike.redOne()) is Bike); Expect.equals(true, (new SpaceShip()) is GoogleOne); - Expect.equals(true, (new Vehicle()) is Bike); //# 01: continued + Expect.equals(true, (new Vehicle()) is Bike); /// 01: continued } diff --git a/tests/language/default_implementation2_test.dart b/tests/language/default_implementation2_test.dart index 2336935dcdc..1b7a3e13732 100644 --- a/tests/language/default_implementation2_test.dart +++ b/tests/language/default_implementation2_test.dart @@ -8,7 +8,7 @@ abstract class Point { } class PointImplementation implements Point { - PointImplementation(int x, int y) {} //# static type warning + PointImplementation(int x, int y) {} /// static type warning } main() { diff --git a/tests/language/deferred_constraints_constants_test.dart b/tests/language/deferred_constraints_constants_test.dart index a45ed15034d..b7e2244b8de 100644 --- a/tests/language/deferred_constraints_constants_test.dart +++ b/tests/language/deferred_constraints_constants_test.dart @@ -9,35 +9,35 @@ import 'dart:mirrors'; import "deferred_constraints_constants_lib.dart" deferred as lib; const myConst1 = - lib.constantInstance; //# reference1: compile-time error - /* // //# reference1: continued + lib.constantInstance; /// reference1: compile-time error + /* // /// reference1: continued 499; - */ // //# reference1: continued + */ // /// reference1: continued const myConst2 = - lib.Const.instance; //# reference2: compile-time error - /* // //# reference2: continued + lib.Const.instance; /// reference2: compile-time error + /* // /// reference2: continued 499; - */ // //# reference2: continued + */ // /// reference2: continued void f1({a: - const lib.Const() //# default_argument1: compile-time error - /* // //# default_argument1: continued + const lib.Const() /// default_argument1: compile-time error + /* // /// default_argument1: continued 499 - */ // //# default_argument1: continued + */ // /// default_argument1: continued }) {} void f2({a: - lib.constantInstance //# default_argument2: compile-time error - /* // //# default_argument2: continued + lib.constantInstance /// default_argument2: compile-time error + /* // /// default_argument2: continued 499 - */ // //# default_argument2: continued + */ // /// default_argument2: continued }) {} -@lib.Const() //# metadata1: compile-time error +@lib.Const() /// metadata1: compile-time error class H1 {} -@lib.Const.instance //# metadata2: compile-time error +@lib.Const.instance /// metadata2: compile-time error class H2 {} -@lib.Const.namedConstructor() //# metadata3: compile-time error +@lib.Const.namedConstructor() /// metadata3: compile-time error class H3 {} void main() { @@ -47,11 +47,11 @@ void main() { asyncStart(); lib.loadLibrary().then((_) { var instance = lib.constantInstance; - var c1 = const lib.Const(); //# constructor1: compile-time error - var c2 = const lib.Const.namedConstructor(); //# constructor2: compile-time error + var c1 = const lib.Const(); /// constructor1: compile-time error + var c2 = const lib.Const.namedConstructor(); /// constructor2: compile-time error f1(); f2(); - var constInstance = lib.constantInstance; //# reference_after_load: ok + var constInstance = lib.constantInstance; /// reference_after_load: ok var h1 = new H1(); var h2 = new H2(); var h3 = new H3(); diff --git a/tests/language/deferred_constraints_type_annotation_test.dart b/tests/language/deferred_constraints_type_annotation_test.dart index 897c0fdde7c..043f85c9a0c 100644 --- a/tests/language/deferred_constraints_type_annotation_test.dart +++ b/tests/language/deferred_constraints_type_annotation_test.dart @@ -6,45 +6,45 @@ import 'package:expect/expect.dart'; import 'package:async_helper/async_helper.dart'; import "deferred_constraints_lib.dart" deferred as lib; -import "deferred_constraints_lib.dart" as lib2; //# type_annotation_non_deferred: ok +import "deferred_constraints_lib.dart" as lib2; /// type_annotation_non_deferred: ok class F {} class G2 {} main() { - lib.C a = null; //# type_annotation_null: static type warning - Expect.throws(() { //# new_before_load: static type warning - lib.C a = new lib.C(); //# new_before_load: continued - }, (e) => e is Error); //# new_before_load: continued + lib.C a = null; /// type_annotation_null: static type warning + Expect.throws(() { /// new_before_load: static type warning + lib.C a = new lib.C(); /// new_before_load: continued + }, (e) => e is Error); /// new_before_load: continued // In this case we do not defer C. - lib2.C a1 = new lib2.C(); //# type_annotation_non_deferred: continued + lib2.C a1 = new lib2.C(); /// type_annotation_non_deferred: continued asyncStart(); lib.loadLibrary().then((_) { - lib.C a2 = new lib.C(); //# type_annotation1: dynamic type error, static type warning - lib.G a3 = new lib.G(); //# type_annotation_generic1: dynamic type error, static type warning - G2 a4 = new G2(); //# type_annotation_generic2: static type warning - G2 a5 = new G2(); //# type_annotation_generic3: static type warning - lib.G a = new lib.G(); //# type_annotation_generic4: dynamic type error, static type warning - var a6 = new lib.C(); //# new: ok - var g1 = new lib.G(); //# new_generic1: ok + lib.C a2 = new lib.C(); /// type_annotation1: dynamic type error, static type warning + lib.G a3 = new lib.G(); /// type_annotation_generic1: dynamic type error, static type warning + G2 a4 = new G2(); /// type_annotation_generic2: static type warning + G2 a5 = new G2(); /// type_annotation_generic3: static type warning + lib.G a = new lib.G(); /// type_annotation_generic4: dynamic type error, static type warning + var a6 = new lib.C(); /// new: ok + var g1 = new lib.G(); /// new_generic1: ok // new G2() does not give a dynamic type error because a malformed // type used as type-parameter is treated as dynamic. - var g2 = new G2(); //# new_generic2: static type warning - var g3 = new lib.G(); //# new_generic3: static type warning + var g2 = new G2(); /// new_generic2: static type warning + var g3 = new lib.G(); /// new_generic3: static type warning var instance = lib.constantInstance; - Expect.throws(() { //# is_check: static type warning - bool a7 = instance is lib.Const; //# is_check: continued - }, (e) => e is TypeError); //# is_check: continued - Expect.throws(() { //# as_operation: static type warning - instance as lib.Const; //# as_operation: continued - }, (e) => e is TypeError); //# as_operation: continued - Expect.throws(() { //# catch_check: static type warning - try { throw instance; } on lib.Const {} //# catch_check: continued - }, (e) => e is TypeError); //# catch_check: continued - int i = lib.C.staticMethod(); //# static_method: ok + Expect.throws(() { /// is_check: static type warning + bool a7 = instance is lib.Const; /// is_check: continued + }, (e) => e is TypeError); /// is_check: continued + Expect.throws(() { /// as_operation: static type warning + instance as lib.Const; /// as_operation: continued + }, (e) => e is TypeError); /// as_operation: continued + Expect.throws(() { /// catch_check: static type warning + try { throw instance; } on lib.Const {} /// catch_check: continued + }, (e) => e is TypeError); /// catch_check: continued + int i = lib.C.staticMethod(); /// static_method: ok asyncEnd(); }); } -lib.C a9 = null; //# type_annotation_top_level: static type warning +lib.C a9 = null; /// type_annotation_top_level: static type warning diff --git a/tests/language/deferred_duplicate_prefix1_test.dart b/tests/language/deferred_duplicate_prefix1_test.dart index 1807e925977..fe6acca1b06 100644 --- a/tests/language/deferred_duplicate_prefix1_test.dart +++ b/tests/language/deferred_duplicate_prefix1_test.dart @@ -3,6 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import "deferred_prefix_constraints_lib2.dart" as lib; -import "deferred_prefix_constraints_lib.dart" deferred as lib; //# 01: compile-time error +import "deferred_prefix_constraints_lib.dart" deferred as lib; /// 01: compile-time error void main() {} diff --git a/tests/language/deferred_duplicate_prefix2_test.dart b/tests/language/deferred_duplicate_prefix2_test.dart index 1edfeca7b18..0be28851ac0 100644 --- a/tests/language/deferred_duplicate_prefix2_test.dart +++ b/tests/language/deferred_duplicate_prefix2_test.dart @@ -2,7 +2,7 @@ // 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 "deferred_prefix_constraints_lib.dart" deferred as lib; // //# 01: compile-time error +import "deferred_prefix_constraints_lib.dart" deferred as lib; // /// 01: compile-time error import "deferred_prefix_constraints_lib2.dart" as lib; void main() {} diff --git a/tests/language/deferred_duplicate_prefix3_test.dart b/tests/language/deferred_duplicate_prefix3_test.dart index 08d8bd19ec5..dc3e85bc9ff 100644 --- a/tests/language/deferred_duplicate_prefix3_test.dart +++ b/tests/language/deferred_duplicate_prefix3_test.dart @@ -2,7 +2,7 @@ // 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 "deferred_prefix_constraints_lib.dart" deferred as lib; //# 01: compile-time error -import "deferred_prefix_constraints_lib2.dart" deferred as lib; //# 01: continued +import "deferred_prefix_constraints_lib.dart" deferred as lib; /// 01: compile-time error +import "deferred_prefix_constraints_lib2.dart" deferred as lib; /// 01: continued void main() {} diff --git a/tests/language/deferred_inheritance_constraints_test.dart b/tests/language/deferred_inheritance_constraints_test.dart index 2e2cf51bdd6..ff009e69fcf 100644 --- a/tests/language/deferred_inheritance_constraints_test.dart +++ b/tests/language/deferred_inheritance_constraints_test.dart @@ -9,20 +9,20 @@ class Foo {} class Foo2 extends D {} class A extends - lib. //# extends: compile-time error + lib. /// extends: compile-time error Foo {} class B implements - lib. //# implements: compile-time error + lib. /// implements: compile-time error Foo {} class C1 {} class C = C1 with - lib. //# mixin: compile-time error + lib. /// mixin: compile-time error Foo; class D { D() ; factory D.factory() = - lib. //# redirecting_constructor: static type warning + lib. /// redirecting_constructor: static type warning Foo2; } @@ -30,7 +30,7 @@ void main() { new A(); new B(); new C(); - Expect.throws(() { //# redirecting_constructor: continued + Expect.throws(() { /// redirecting_constructor: continued new D.factory(); - }); //# redirecting_constructor: continued + }); /// redirecting_constructor: continued } \ No newline at end of file diff --git a/tests/language/deferred_load_constants_test.dart b/tests/language/deferred_load_constants_test.dart index f56414c5080..2d795f431b9 100644 --- a/tests/language/deferred_load_constants_test.dart +++ b/tests/language/deferred_load_constants_test.dart @@ -24,11 +24,11 @@ main() { Expect.identical(toplevel, foo.toplevel); Expect.identical(C.staticfun, foo.C.staticfun); // Access through deferred prefix is not a constant expression. - Expect.throws(() => const [foo.c]); // //# 01: compile-time error - Expect.throws(() => const [foo.C]); // //# 02: compile-time error - Expect.throws(() => const [foo.funtype]); // //# 03: compile-time error - Expect.throws(() => const [foo.toplevel]); // //# 04: compile-time error - Expect.throws(() => const [foo.C.staticfun]); // //# 05: compile-time error + Expect.throws(() => const [foo.c]); // /// 01: compile-time error + Expect.throws(() => const [foo.C]); // /// 02: compile-time error + Expect.throws(() => const [foo.funtype]); // /// 03: compile-time error + Expect.throws(() => const [foo.toplevel]); // /// 04: compile-time error + Expect.throws(() => const [foo.C.staticfun]); // /// 05: compile-time error asyncEnd(); }); diff --git a/tests/language/deferred_load_library_wrong_args_test.dart b/tests/language/deferred_load_library_wrong_args_test.dart index c4bbc1430f9..81f697363d6 100644 --- a/tests/language/deferred_load_library_wrong_args_test.dart +++ b/tests/language/deferred_load_library_wrong_args_test.dart @@ -3,6 +3,6 @@ import "deferred_load_library_wrong_args_lib.dart" deferred as lib; void main() { // Loadlibrary should be called without arguments. lib.loadLibrary( - 10 //# 01: runtime error + 10 /// 01: runtime error ); } \ No newline at end of file diff --git a/tests/language/deferred_no_prefix_test.dart b/tests/language/deferred_no_prefix_test.dart index e4012400780..c81b47c34c1 100644 --- a/tests/language/deferred_no_prefix_test.dart +++ b/tests/language/deferred_no_prefix_test.dart @@ -4,7 +4,7 @@ // Loading a deferred library without prefix is not allowed. import "deferred_constraints_lib2.dart" - deferred //# 01: compile-time error + deferred /// 01: compile-time error ; void main() { diff --git a/tests/language/deferred_super_dependency_test.dart b/tests/language/deferred_super_dependency_test.dart index aa42f8da90b..d2f801fbe21 100644 --- a/tests/language/deferred_super_dependency_test.dart +++ b/tests/language/deferred_super_dependency_test.dart @@ -7,9 +7,9 @@ // used to cause a crash. import "package:expect/expect.dart"; -import "deferred_super_dependency_lib.dart" deferred as lib; //# 01: static type warning +import "deferred_super_dependency_lib.dart" deferred as lib; /// 01: static type warning main() async { - await lib.loadLibrary(); //# 01: continued - Expect.throws(() => new lib.C().foo(), (e) => e is NoSuchMethodError); //# 01: continued + await lib.loadLibrary(); /// 01: continued + Expect.throws(() => new lib.C().foo(), (e) => e is NoSuchMethodError); /// 01: continued } \ No newline at end of file diff --git a/tests/language/deferred_type_dependency_test.dart b/tests/language/deferred_type_dependency_test.dart index b6d6fb5093a..dd285c8f150 100644 --- a/tests/language/deferred_type_dependency_test.dart +++ b/tests/language/deferred_type_dependency_test.dart @@ -14,19 +14,19 @@ runTest() async { await lib1.loadLibrary(); // Split the cases into a multi-test to test each feature separately. Expect.isFalse( - lib1.fooIs //# is: ok - lib1.fooAs //# as: ok - lib1.fooAnnotation //# type_annotation: ok + lib1.fooIs /// is: ok + lib1.fooAs /// as: ok + lib1.fooAnnotation /// type_annotation: ok ("string") - is! String //# none: ok + is! String /// none: ok ); await lib2.loadLibrary(); Expect.isTrue( - lib1.fooIs //# is: ok - lib1.fooAs //# as: ok - lib1.fooAnnotation //# type_annotation: ok + lib1.fooIs /// is: ok + lib1.fooAs /// as: ok + lib1.fooAnnotation /// type_annotation: ok (lib2.getInstance()) - is! String //# none: ok + is! String /// none: ok ); } diff --git a/tests/language/duplicate_constructor_test.dart b/tests/language/duplicate_constructor_test.dart index 45b344afcd0..816153bbfaf 100644 --- a/tests/language/duplicate_constructor_test.dart +++ b/tests/language/duplicate_constructor_test.dart @@ -4,7 +4,7 @@ class Foo { Foo(); - Foo(); //# 01: compile-time error + Foo(); /// 01: compile-time error } main() { diff --git a/tests/language/duplicate_implements_test.dart b/tests/language/duplicate_implements_test.dart index 8bb74e3a0d0..c85e40c98fb 100644 --- a/tests/language/duplicate_implements_test.dart +++ b/tests/language/duplicate_implements_test.dart @@ -8,15 +8,15 @@ abstract class I { } abstract class J { } abstract class K { } -class X implements I, J, I { } // //# 01: compile-time error -class X implements J, I, K, K { } // //# 02: compile-time error +class X implements I, J, I { } // /// 01: compile-time error +class X implements J, I, K, K { } // /// 02: compile-time error -abstract class Z implements I, J, J { } // //# 03: compile-time error -abstract class Z implements K, K { } // //# 04: compile-time error +abstract class Z implements I, J, J { } // /// 03: compile-time error +abstract class Z implements K, K { } // /// 04: compile-time error main() { - X x = new X(); // //# 01: continued - X x = new X(); // //# 02: continued - Z z = new Z(); // //# 03: continued - Z z = new Z(); // //# 04: continued + X x = new X(); // /// 01: continued + X x = new X(); // /// 02: continued + Z z = new Z(); // /// 03: continued + Z z = new Z(); // /// 04: continued } diff --git a/tests/language/duplicate_interface_negative_test.dart b/tests/language/duplicate_interface_negative_test.dart index c7e9f855a4e..444c02b5077 100644 --- a/tests/language/duplicate_interface_negative_test.dart +++ b/tests/language/duplicate_interface_negative_test.dart @@ -10,7 +10,7 @@ import "duplicate_interface_lib.dart" show InterfA; // Expect error since InterfA and alib.InterfA refer to the same interface. -class Foo implements InterfA, alib.InterfA { } //# compile-time error +class Foo implements InterfA, alib.InterfA { } /// compile-time error main() { diff --git a/tests/language/dynamic2_test.dart b/tests/language/dynamic2_test.dart index a4081fbf87f..a19ee4f1679 100644 --- a/tests/language/dynamic2_test.dart +++ b/tests/language/dynamic2_test.dart @@ -5,8 +5,8 @@ // Test the prohibited use of 'dynamic' in extending and implementing classes. class A - extends dynamic // //# 00: compile-time error - implements dynamic // //# 01: compile-time error + extends dynamic // /// 00: compile-time error + implements dynamic // /// 01: compile-time error { } diff --git a/tests/language/dynamic_field_test.dart b/tests/language/dynamic_field_test.dart index 557c6741f7d..5328471aacb 100644 --- a/tests/language/dynamic_field_test.dart +++ b/tests/language/dynamic_field_test.dart @@ -13,12 +13,12 @@ class A extends C { class C { foo() { - print(a); //# 01: static type warning - return a; //# 01: continued + print(a); /// 01: static type warning + return a; /// 01: continued } bar() { - print(b.a); //# 02: static type warning - return b.a; //# 02: continued + print(b.a); /// 02: static type warning + return b.a; /// 02: continued } } @@ -26,6 +26,6 @@ main() { var a = new A(); a.a = 1; a.b = a; - Expect.equals(1, a.foo()); //# 01: continued - Expect.equals(1, a.bar()); //# 02: continued + Expect.equals(1, a.foo()); /// 01: continued + Expect.equals(1, a.bar()); /// 02: continued } diff --git a/tests/language/dynamic_prefix_core_test.dart b/tests/language/dynamic_prefix_core_test.dart index 24bf79a2f6f..610f8e47acb 100644 --- a/tests/language/dynamic_prefix_core_test.dart +++ b/tests/language/dynamic_prefix_core_test.dart @@ -11,7 +11,7 @@ void main() { // Should still be available because it is not a member of dart:core. Expect.isTrue(dynamic is mycore.Type); - Expect.throws(() => mycore.dynamic is mycore.Type, // //# 01: static type warning - (e) => e is mycore.NoSuchMethodError, // //# 01: continued - 'dynamic is not a member of dart:core'); //# 01: continued + Expect.throws(() => mycore.dynamic is mycore.Type, // /// 01: static type warning + (e) => e is mycore.NoSuchMethodError, // /// 01: continued + 'dynamic is not a member of dart:core'); /// 01: continued } diff --git a/tests/language/enum_duplicate_test.dart b/tests/language/enum_duplicate_test.dart index 29c35f8f4ab..ad0665a2fda 100644 --- a/tests/language/enum_duplicate_test.dart +++ b/tests/language/enum_duplicate_test.dart @@ -8,8 +8,8 @@ library enum_duplicate_test; import 'package:expect/expect.dart'; -import 'enum_duplicate_lib.dart' as lib; //# 01: ok -import 'enum_duplicate_lib.dart' as lib; //# 02: ok +import 'enum_duplicate_lib.dart' as lib; /// 01: ok +import 'enum_duplicate_lib.dart' as lib; /// 02: ok enum Enum1 { A, @@ -23,9 +23,9 @@ enum Enum2 { main() { Expect.equals('Enum1.A,Enum1.B', Enum1.values.join(',')); - Expect.equals('Enum1.A,Enum1.B', lib.Enum1.values.join(',')); //# 01: continued + Expect.equals('Enum1.A,Enum1.B', lib.Enum1.values.join(',')); /// 01: continued Expect.equals('Enum2.A,Enum2.B', Enum2.values.join(',')); - Expect.equals('Enum2.A,Enum2.B', lib.Enum2.values.join(',')); //# 02: continued + Expect.equals('Enum2.A,Enum2.B', lib.Enum2.values.join(',')); /// 02: continued } diff --git a/tests/language/enum_is_keyword_test.dart b/tests/language/enum_is_keyword_test.dart index 5b583d47121..2d24d94810a 100644 --- a/tests/language/enum_is_keyword_test.dart +++ b/tests/language/enum_is_keyword_test.dart @@ -6,5 +6,5 @@ // declarations. main() { - var enum; //# 01: compile-time error + var enum; /// 01: compile-time error } diff --git a/tests/language/enum_private_test.dart b/tests/language/enum_private_test.dart index f33f91a26a2..bf99f4f2ae9 100644 --- a/tests/language/enum_private_test.dart +++ b/tests/language/enum_private_test.dart @@ -17,8 +17,8 @@ enum Enum1 { main() { Expect.equals('Enum1._A,Enum1._B', Enum1.values.join(',')); - Expect.equals('Enum2._A,Enum2._B', Enum2.values.join(',')); //# 01: ok - Expect.throws(() => Enum2._A, (e) => e is NoSuchMethodError); //# 02: static type warning + Expect.equals('Enum2._A,Enum2._B', Enum2.values.join(',')); /// 01: ok + Expect.throws(() => Enum2._A, (e) => e is NoSuchMethodError); /// 02: static type warning } diff --git a/tests/language/enum_syntax_test.dart b/tests/language/enum_syntax_test.dart index fabc429eafb..d0226cd866c 100644 --- a/tests/language/enum_syntax_test.dart +++ b/tests/language/enum_syntax_test.dart @@ -13,59 +13,59 @@ enum Color { red, orange, yellow, green } enum Veggies { carrot, bean, broccolo, } // Need at least one enumeration identifier. -enum Nada {} // //# 01: compile-time error +enum Nada {} // /// 01: compile-time error // Duplicate entries are a compile-time error -enum ComeAgain { ahau, knust, zipfel, knust, gupf } // //# 02: compile-time error +enum ComeAgain { ahau, knust, zipfel, knust, gupf } // /// 02: compile-time error // Enum entries must not collide with implicitly defined members. -enum ComeAgain { ahau, knust, zipfel, index } //# 03: compile-time error +enum ComeAgain { ahau, knust, zipfel, index } /// 03: compile-time error -enum ComeAgain { ahau, knust, zipfel, values } //# 04: compile-time error +enum ComeAgain { ahau, knust, zipfel, values } /// 04: compile-time error -enum ComeAgain { ahau, knust, zipfel, toString } //# 05: compile-time error +enum ComeAgain { ahau, knust, zipfel, toString } /// 05: compile-time error // Enum entry must not collide with enum type name. -enum ComeAgain { ahau, knust, zipfel, ComeAgain } //# 06: compile-time error +enum ComeAgain { ahau, knust, zipfel, ComeAgain } /// 06: compile-time error // Missing comma. -enum Numbers { one, two, three four, five } // //# 07: compile-time error +enum Numbers { one, two, three four, five } // /// 07: compile-time error // Missing enum type name. -enum { eins, zwei, drei } // //# 08: compile-time error +enum { eins, zwei, drei } // /// 08: compile-time error // Duplicate name in library scope. topLevelFunction() => null; -enum topLevelFunction { bla, blah } // //# 09: compile-time error +enum topLevelFunction { bla, blah } // /// 09: compile-time error class C {} -enum C { bla, blah } // //# 10: compile-time error +enum C { bla, blah } // /// 10: compile-time error var zzTop; -enum zzTop { Billy, Dusty, Frank } // //# 11: compile-time error +enum zzTop { Billy, Dusty, Frank } // /// 11: compile-time error // Enum type cannot be super type or interface type. -class Rainbow extends Color {} // //# 20: compile-time error -class Rainbow implements Color {} // //# 21: compile-time error -class Rainbow extends List with Color {} // //# 22: compile-time error +class Rainbow extends Color {} // /// 20: compile-time error +class Rainbow implements Color {} // /// 21: compile-time error +class Rainbow extends List with Color {} // /// 22: compile-time error main() { - Nada x; //# 01: continued - var x = ComeAgain.zipfel; // //# 02: continued - var x = ComeAgain.zipfel; // //# 03: continued - var x = ComeAgain.zipfel; // //# 04: continued - var x = ComeAgain.zipfel; // //# 05: continued - var x = ComeAgain.zipfel; // //# 06: continued - var x = Numbers.four; // //# 07: continued - var x = topLevelFunction.bla; // //# 09: continued - var x = C.bla; // //# 10: continued - var x = zzTop.Frank; // //# 11: continued + Nada x; /// 01: continued + var x = ComeAgain.zipfel; // /// 02: continued + var x = ComeAgain.zipfel; // /// 03: continued + var x = ComeAgain.zipfel; // /// 04: continued + var x = ComeAgain.zipfel; // /// 05: continued + var x = ComeAgain.zipfel; // /// 06: continued + var x = Numbers.four; // /// 07: continued + var x = topLevelFunction.bla; // /// 09: continued + var x = C.bla; // /// 10: continued + var x = zzTop.Frank; // /// 11: continued - var x = new Rainbow(); // //# 20: continued - var x = new Rainbow(); // //# 21: continued - var x = new Rainbow(); // //# 22: continued + var x = new Rainbow(); // /// 20: continued + var x = new Rainbow(); // /// 21: continued + var x = new Rainbow(); // /// 22: continued // It is a compile-time error to explicitly instantiate an enum instance. - var x = new Color(); // //# 30: compile-time error + var x = new Color(); // /// 30: compile-time error } diff --git a/tests/language/error_stacktrace_test.dart b/tests/language/error_stacktrace_test.dart index 9cb7f5a6130..90eb3f3af33 100644 --- a/tests/language/error_stacktrace_test.dart +++ b/tests/language/error_stacktrace_test.dart @@ -85,7 +85,7 @@ class Helper3 { try { // There should be no stackTrace in this normal exception object. // We should get a NoSuchMethodError. - var trace = e.stackTrace; //# static type warning + var trace = e.stackTrace; /// static type warning } on NoSuchMethodError catch (e) { Expect.isNotNull(e.stackTrace, "Error needs a stackTrace on throw"); } diff --git a/tests/language/export_private_test.dart b/tests/language/export_private_test.dart index 2828f4534a8..c617ceca5a1 100644 --- a/tests/language/export_private_test.dart +++ b/tests/language/export_private_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // Check that private dart:_ libraries cannot be imported. -export "dart:_internal"; // //# 01: compile-time error +export "dart:_internal"; // /// 01: compile-time error main() { print("Done."); diff --git a/tests/language/external_test.dart b/tests/language/external_test.dart index 01c71423e93..1afe6a547cf 100644 --- a/tests/language/external_test.dart +++ b/tests/language/external_test.dart @@ -12,26 +12,26 @@ class Foo { Foo() : x = 0; - external var x01; // //# 01: compile-time error - external int x02; // //# 02: compile-time error + external var x01; // /// 01: compile-time error + external int x02; // /// 02: compile-time error - external f10(); // //# 10: runtime error - external f11() { } // //# 11: compile-time error - external f12() => 1; // //# 12: compile-time error - external static f13(); // //# 13: runtime error - static external f14(); // //# 14: compile-time error - int external f16(); // //# 16: compile-time error + external f10(); // /// 10: runtime error + external f11() { } // /// 11: compile-time error + external f12() => 1; // /// 12: compile-time error + external static f13(); // /// 13: runtime error + static external f14(); // /// 14: compile-time error + int external f16(); // /// 16: compile-time error - external Foo.n20(val); // //# 20: runtime error - external Foo.n21(val) : x = 1; // //# 21: compile-time error - external Foo.n22(val) { x = 1; } // //# 22: compile-time error - external factory Foo.n23(val) => new Foo(); // //# 23: compile-time error - external Foo.n24(this.x); // //# 24: compile-time error - external factory Foo.n25(val) = Bar; // //# 25: compile-time error + external Foo.n20(val); // /// 20: runtime error + external Foo.n21(val) : x = 1; // /// 21: compile-time error + external Foo.n22(val) { x = 1; } // /// 22: compile-time error + external factory Foo.n23(val) => new Foo(); // /// 23: compile-time error + external Foo.n24(this.x); // /// 24: compile-time error + external factory Foo.n25(val) = Bar; // /// 25: compile-time error } -external int t06(int i) { } // //# 30: compile-time error -external int t07(int i) => i + 1; // //# 31: compile-time error +external int t06(int i) { } // /// 30: compile-time error +external int t07(int i) => i + 1; // /// 31: compile-time error main() { @@ -39,21 +39,21 @@ main() { var foo = new Foo(); // Try calling an unpatched external function. - new Foo().f10(); // //# 10: continued - new Foo().f11(); // //# 11: continued - new Foo().f12(); // //# 12: continued - Foo.f13(); // //# 13: continued - Foo.f14(); // //# 14: continued - new Foo().f16(); // //# 16: continued + new Foo().f10(); // /// 10: continued + new Foo().f11(); // /// 11: continued + new Foo().f12(); // /// 12: continued + Foo.f13(); // /// 13: continued + Foo.f14(); // /// 14: continued + new Foo().f16(); // /// 16: continued // Try calling an unpatched external constructor. - new Foo.n20(1); // //# 20: continued - new Foo.n21(1); // //# 21: continued - new Foo.n22(1); // //# 22: continued - new Foo.n23(1); // //# 23: continued - new Foo.n24(1); // //# 24: continued - new Foo.n25(1); // //# 25: continued + new Foo.n20(1); // /// 20: continued + new Foo.n21(1); // /// 21: continued + new Foo.n22(1); // /// 22: continued + new Foo.n23(1); // /// 23: continued + new Foo.n24(1); // /// 24: continued + new Foo.n25(1); // /// 25: continued - t06(1); // //# 30: continued - t07(1); // //# 31: continued + t06(1); // /// 30: continued + t07(1); // /// 31: continued } diff --git a/tests/language/f_bounded_quantification_test.dart b/tests/language/f_bounded_quantification_test.dart index 8f912dbb20d..b284ee31dac 100644 --- a/tests/language/f_bounded_quantification_test.dart +++ b/tests/language/f_bounded_quantification_test.dart @@ -32,22 +32,22 @@ main() { { bool got_type_error = false; try { - FBound fsb = new FBound(); // //# 01: static type warning + FBound fsb = new FBound(); // /// 01: static type warning } on TypeError catch (error) { got_type_error = true; } // Type error in checked mode only. - Expect.isTrue(got_type_error == isCheckedMode()); // //# 01: continued + Expect.isTrue(got_type_error == isCheckedMode()); // /// 01: continued } FBound> fbb = new FBound>(); { bool got_type_error = false; try { - FBound> fsb = new FBound>(); // //# 02: static type warning + FBound> fsb = new FBound>(); // /// 02: static type warning } on TypeError catch (error) { got_type_error = true; } // Type error in checked mode only. - Expect.isTrue(got_type_error == isCheckedMode()); // //# 02: continued + Expect.isTrue(got_type_error == isCheckedMode()); // /// 02: continued } } diff --git a/tests/language/factory1_test.dart b/tests/language/factory1_test.dart index bb175048239..569f89ddfa2 100644 --- a/tests/language/factory1_test.dart +++ b/tests/language/factory1_test.dart @@ -20,7 +20,7 @@ class B extends A { main() { new A.factory(); - new A.factory(); // //# 00: dynamic type error + new A.factory(); // /// 00: dynamic type error new B.factory(); - new B.factory(); // //# 01: dynamic type error + new B.factory(); // /// 01: dynamic type error } diff --git a/tests/language/factory2_test.dart b/tests/language/factory2_test.dart index 85985a4174d..963d8384943 100644 --- a/tests/language/factory2_test.dart +++ b/tests/language/factory2_test.dart @@ -6,7 +6,7 @@ import "dart:collection"; abstract class Link extends IterableBase { // does not match constructor for LinkFactory - factory Link(T head, [Link tail]) = LinkFactory; //# static type warning + factory Link(T head, [Link tail]) = LinkFactory; /// static type warning Link prepend(T element); } @@ -39,14 +39,14 @@ class LinkEntry extends AbstractLink { class Fisk { // instantiation of abstract class - Link nodes = const EmptyLink(); // //# static type warning + Link nodes = const EmptyLink(); // /// static type warning } main() { new Fisk(); // instantiation of abstract class - new EmptyLink().prepend('hest'); //# static type warning + new EmptyLink().prepend('hest'); /// static type warning // instantiation of abstract class - const EmptyLink().prepend('fisk'); //# static type warning + const EmptyLink().prepend('fisk'); /// static type warning } diff --git a/tests/language/factory6_test.dart b/tests/language/factory6_test.dart index 3d06b0d408d..ce30c65fd40 100644 --- a/tests/language/factory6_test.dart +++ b/tests/language/factory6_test.dart @@ -5,13 +5,13 @@ import 'package:expect/expect.dart'; abstract class Link { - factory Link.Foo() = LinkFactory.Foo; // //# 00: static type warning + factory Link.Foo() = LinkFactory.Foo; // /// 00: static type warning } class LinkFactory { - factory LinkFactory.Foo() = Foo; // //# 00: continued + factory LinkFactory.Foo() = Foo; // /// 00: continued } main() { - Expect.throws(() => new Link.Foo()); //# 00: continued + Expect.throws(() => new Link.Foo()); /// 00: continued } diff --git a/tests/language/factory_implementation_test.dart b/tests/language/factory_implementation_test.dart index dc1faad04fa..f8aaadbb95e 100644 --- a/tests/language/factory_implementation_test.dart +++ b/tests/language/factory_implementation_test.dart @@ -36,8 +36,8 @@ main() { Expect.equals(1, a.x); Expect.equals(2, a.y); - var x = new X(11, 22); // //# 00: dynamic type error + var x = new X(11, 22); // /// 00: dynamic type error // Check that factory is invoked. - Expect.equals(110, x.x); // //# 00: continued - Expect.equals(220, x.y); // //# 00: continued + Expect.equals(110, x.x); // /// 00: continued + Expect.equals(220, x.y); // /// 00: continued } diff --git a/tests/language/factory_redirection2_test.dart b/tests/language/factory_redirection2_test.dart index 775ac2e9b95..0884930e41f 100644 --- a/tests/language/factory_redirection2_test.dart +++ b/tests/language/factory_redirection2_test.dart @@ -9,7 +9,7 @@ import "package:expect/expect.dart"; class Foo { Foo() - = Bar //# 01: compile-time error + = Bar /// 01: compile-time error ; } diff --git a/tests/language/factory_redirection3_cyclic_test.dart b/tests/language/factory_redirection3_cyclic_test.dart index acd564e166f..46629118fa4 100644 --- a/tests/language/factory_redirection3_cyclic_test.dart +++ b/tests/language/factory_redirection3_cyclic_test.dart @@ -15,7 +15,7 @@ class B implements A { class C implements B { factory C.bar() = C.foo; factory C.foo() = C - .bar //# 01: compile-time error + .bar /// 01: compile-time error ; C(); } diff --git a/tests/language/factory_redirection_test.dart b/tests/language/factory_redirection_test.dart index e359dd6748b..62fee859d51 100644 --- a/tests/language/factory_redirection_test.dart +++ b/tests/language/factory_redirection_test.dart @@ -13,13 +13,13 @@ class A { return new B(); } - factory A.test01() = T; // //# 01: runtime error + factory A.test01() = T; // /// 01: runtime error - factory A.test02() = dynamic; // //# 02: runtime error + factory A.test02() = dynamic; // /// 02: runtime error - factory A.test03() = Undefined; // //# 03: runtime error + factory A.test03() = Undefined; // /// 03: runtime error - factory A.test04() = C.test04; // //# 04: compile-time error + factory A.test04() = C.test04; // /// 04: compile-time error final T x; } @@ -33,11 +33,11 @@ class B extends A { factory B.A_factory() = A.factory; - factory B.test04() = A.test04; // //# 04: continued + factory B.test04() = A.test04; // /// 04: continued - factory B.test05(int incompatible) = A.factory; // //# 05: runtime error + factory B.test05(int incompatible) = A.factory; // /// 05: runtime error - factory B.test05(int incompatible) = A.factory; // //# 06: runtime error + factory B.test05(int incompatible) = A.factory; // /// 06: runtime error } class C extends B { @@ -49,29 +49,29 @@ class C extends B { const factory C.B_constant(V x) = B.A_constant; - factory C.test04() = B.test04; // //# 04: continued + factory C.test04() = B.test04; // /// 04: continued - factory C.test06(int incompatible) = B.test05; // //# 06: continued + factory C.test06(int incompatible) = B.test05; // /// 06: continued - const factory C.test07(V x) = B.A; // //# 07: compile-time error + const factory C.test07(V x) = B.A; // /// 07: compile-time error } main() { - new A.test01(); // //# 01: continued - new A.test02(); // //# 02: continued - new A.test03(); // //# 03: continued - new C.test04(); // //# 04: continued - new B.test05(0); // //# 05: continued - new C.test06(0); // //# 06: continued - new C.test07(0); // //# 07: continued + new A.test01(); // /// 01: continued + new A.test02(); // /// 02: continued + new A.test03(); // /// 03: continued + new C.test04(); // /// 04: continued + new B.test05(0); // /// 05: continued + new C.test06(0); // /// 06: continued + new C.test07(0); // /// 07: continued Expect.isTrue(new A() is A); Expect.isTrue(new A.constant(true).x); Expect.isTrue(new A.factory() is B); - Expect.isTrue(new B.A() is A); // //# 08: dynamic type error - Expect.isFalse(new B.A() is A); // //# 09: dynamic type error - Expect.isTrue(new B.A_constant(true).x); // //# 10: dynamic type error - Expect.isTrue(new B.A_factory() is B); // //# 11: dynamic type error - Expect.isTrue(new C.A() is A); // //# 12: dynamic type error - Expect.isTrue(new C.A_factory() is B); // //# 13: dynamic type error - Expect.isTrue(new C.B_constant(true).x); // //# 14: dynamic type error + Expect.isTrue(new B.A() is A); // /// 08: dynamic type error + Expect.isFalse(new B.A() is A); // /// 09: dynamic type error + Expect.isTrue(new B.A_constant(true).x); // /// 10: dynamic type error + Expect.isTrue(new B.A_factory() is B); // /// 11: dynamic type error + Expect.isTrue(new C.A() is A); // /// 12: dynamic type error + Expect.isTrue(new C.A_factory() is B); // /// 13: dynamic type error + Expect.isTrue(new C.B_constant(true).x); // /// 14: dynamic type error } diff --git a/tests/language/fauxverride_test.dart b/tests/language/fauxverride_test.dart index 45e7d64dc4b..4bc2d36a4fb 100644 --- a/tests/language/fauxverride_test.dart +++ b/tests/language/fauxverride_test.dart @@ -68,7 +68,7 @@ class Sub extends Super { // According to 7.1, instance methods include those of the // superclass, and according to 7, it is a compile-time to have an // instance method and static method with the same name. - static //# 03: compile-time error + static /// 03: compile-time error instanceMethod() => m(); // According to 7.7, static variables are not inherited. @@ -79,7 +79,7 @@ class Sub extends Super { // instance method and static method with the same // name. Furthermore, according to 7.7 a static variable induces an // implicit getter function (a static method). - static var instanceMethod2; //# 05: compile-time error + static var instanceMethod2; /// 05: compile-time error foo() => 'foo'; } diff --git a/tests/language/field_decl_missing_var_type_test.dart b/tests/language/field_decl_missing_var_type_test.dart index d6e004fe78f..7b659f96ae1 100644 --- a/tests/language/field_decl_missing_var_type_test.dart +++ b/tests/language/field_decl_missing_var_type_test.dart @@ -7,9 +7,9 @@ // generate a compile-time error. class A { - _this; // //# 01: compile-time error - A(x) : this._this = x; // //# 01: continued + _this; // /// 01: compile-time error + A(x) : this._this = x; // /// 01: continued } main() { - new A(0); // //# 01: continued + new A(0); // /// 01: continued } diff --git a/tests/language/field_override3_test.dart b/tests/language/field_override3_test.dart index 9b100be75b7..a5dbe7211ee 100644 --- a/tests/language/field_override3_test.dart +++ b/tests/language/field_override3_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: compile-time error + var foo = 42; // /// 00: compile-time error + get foo => 42; // /// 01: compile-time error + foo() => 42; // /// 02: compile-time error + set foo(value) { } // /// 03: compile-time error } class B extends A { diff --git a/tests/language/field_override4_test.dart b/tests/language/field_override4_test.dart index 08fde7962f3..9b838c8680e 100644 --- a/tests/language/field_override4_test.dart +++ b/tests/language/field_override4_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: ok - get foo => 42; // //# 01: ok - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: ok + var foo = 42; // /// 00: ok + get foo => 42; // /// 01: ok + foo() => 42; // /// 02: compile-time error + set foo(value) { } // /// 03: ok } class B extends A { diff --git a/tests/language/field_override_test.dart b/tests/language/field_override_test.dart index 4c6e96f2487..c298a83cd59 100644 --- a/tests/language/field_override_test.dart +++ b/tests/language/field_override_test.dart @@ -26,13 +26,13 @@ class SubSub extends Super { SubSub() : super(); // B2 not assignable to B1 - B2 field; // //# 01: static type warning + B2 field; // /// 01: static type warning } main() { SubSub val1 = new SubSub(); - val1.field = new B2(); //# 02: static type warning, dynamic type error - Expect.equals(true, val1.field is B2); //# 02: continued + val1.field = new B2(); /// 02: static type warning, dynamic type error + Expect.equals(true, val1.field is B2); /// 02: continued Sub val2 = new Sub(); val2.field = new A(); diff --git a/tests/language/field_type_check2_test.dart b/tests/language/field_type_check2_test.dart index 8fa875217a5..80925f4f7d4 100644 --- a/tests/language/field_type_check2_test.dart +++ b/tests/language/field_type_check2_test.dart @@ -6,7 +6,7 @@ class A { A a; bar(c) { - c.a = 2; //# 01: dynamic type error + c.a = 2; /// 01: dynamic type error } } @@ -15,6 +15,6 @@ class B { } main() { - new A().bar(new A()); //# 01: continued + new A().bar(new A()); /// 01: continued new A().bar(new B()); } diff --git a/tests/language/field_type_check_test.dart b/tests/language/field_type_check_test.dart index f1c3d436a0a..0a6fe3682e7 100644 --- a/tests/language/field_type_check_test.dart +++ b/tests/language/field_type_check_test.dart @@ -7,5 +7,5 @@ class A { } int main() { - new A().e = "String"; //# 01: static type warning, dynamic type error + new A().e = "String"; /// 01: static type warning, dynamic type error } diff --git a/tests/language/final_for_in_variable_test.dart b/tests/language/final_for_in_variable_test.dart index 8649aef5a43..c6575793c29 100644 --- a/tests/language/final_for_in_variable_test.dart +++ b/tests/language/final_for_in_variable_test.dart @@ -4,6 +4,6 @@ main() { for (final i in [1, 2, 3]) { - i = 4; //# 01: static type warning, runtime error + i = 4; /// 01: static type warning, runtime error } } diff --git a/tests/language/final_initializer_instance_reference_test.dart b/tests/language/final_initializer_instance_reference_test.dart index 7e4da6d5ba0..65580e778d5 100644 --- a/tests/language/final_initializer_instance_reference_test.dart +++ b/tests/language/final_initializer_instance_reference_test.dart @@ -9,9 +9,9 @@ class C { const C(); final x = 1; - final y = x; //# 01: compile-time error + final y = x; /// 01: compile-time error } main() { - const C().y; //# 01: continued + const C().y; /// 01: continued } diff --git a/tests/language/final_is_not_const_test.dart b/tests/language/final_is_not_const_test.dart index 433d4d06c27..bc92d365a82 100644 --- a/tests/language/final_is_not_const_test.dart +++ b/tests/language/final_is_not_const_test.dart @@ -5,9 +5,9 @@ import "package:expect/expect.dart"; final F0 = 42; -const C0 = F0; // //# 01: compile-time error +const C0 = F0; // /// 01: compile-time error main() { Expect.equals(42, F0); - Expect.equals(42, C0); // //# 01: continued + Expect.equals(42, C0); // /// 01: continued } diff --git a/tests/language/final_param_test.dart b/tests/language/final_param_test.dart index e9cdda1dd12..56b02d9b7a8 100644 --- a/tests/language/final_param_test.dart +++ b/tests/language/final_param_test.dart @@ -5,7 +5,7 @@ class A { static void test(final x) { - x = 2; // //# 01: static type warning, runtime error + x = 2; // /// 01: static type warning, runtime error } } diff --git a/tests/language/final_super_field_set_test.dart b/tests/language/final_super_field_set_test.dart index 36e9f89bbce..9c3289bb1f9 100644 --- a/tests/language/final_super_field_set_test.dart +++ b/tests/language/final_super_field_set_test.dart @@ -11,10 +11,10 @@ class SuperClass { class Class extends SuperClass { m() { - super.field = 87; //# 01: static type warning + super.field = 87; /// 01: static type warning } } main() { - new Class().m(); //# 01: continued + new Class().m(); /// 01: continued } \ No newline at end of file diff --git a/tests/language/final_syntax_test.dart b/tests/language/final_syntax_test.dart index bf6f97579a1..85c92e78cd9 100644 --- a/tests/language/final_syntax_test.dart +++ b/tests/language/final_syntax_test.dart @@ -6,16 +6,16 @@ import "package:expect/expect.dart"; main() { final f0 = 42; - final f1; //# 01: compile-time error + final f1; /// 01: compile-time error final int f2 = 87; - final int f3; //# 02: compile-time error + final int f3; /// 02: compile-time error Expect.equals(42, f0); Expect.equals(87, f2); Expect.equals(42, F0); - Expect.equals(null, F1); //# 03: compile-time error + Expect.equals(null, F1); /// 03: compile-time error Expect.equals(87, F2); - Expect.equals(null, F3); //# 04: compile-time error + Expect.equals(null, F3); /// 04: compile-time error Expect.isTrue(P0 is Point); Expect.isTrue(P1 is int); @@ -24,20 +24,20 @@ main() { Expect.isTrue(A0 is int); Expect.isTrue(A1 is int); - Expect.isTrue(A2 is int); //# 08: runtime error - Expect.isTrue(A3 is int); //# 08: continued + Expect.isTrue(A2 is int); /// 08: runtime error + Expect.isTrue(A3 is int); /// 08: continued Expect.isTrue(C0.X is C1); - Expect.isTrue(C0.X.x is C1); //# 09: compile-time error + Expect.isTrue(C0.X.x is C1); /// 09: compile-time error Expect.equals("Hello 42", B2); - Expect.equals("42Hello", B3); //# 10: runtime error + Expect.equals("42Hello", B3); /// 10: runtime error } final F0 = 42; -final F1; // //# 03: continued +final F1; // /// 03: continued final int F2 = 87; -final int F3; // //# 04: continued +final int F3; // /// 04: continued class Point { final x, y; @@ -56,8 +56,8 @@ final P3 = new Point(0, 0) + 1; // expressions. final A0 = 42; final A1 = A0 + 1; -final A2 = A3 + 1; //# 08: continued -final A3 = A2 + 1; //# 08: continued +final A2 = A3 + 1; /// 08: continued +final A3 = A2 + 1; /// 08: continued class C0 { static final X = const C1(); @@ -65,7 +65,7 @@ class C0 { class C1 { const C1() - : x = C0.X //# 09: continued + : x = C0.X /// 09: continued ; final x = null; } @@ -74,4 +74,4 @@ class C1 { final B0 = 42; final B1 = "Hello"; final B2 = "$B1 $B0"; -final B3 = B0 + B1; //# 10: continued +final B3 = B0 + B1; /// 10: continued diff --git a/tests/language/final_variable_assignment_test.dart b/tests/language/final_variable_assignment_test.dart index 59c275a5236..1a6df0b21ea 100644 --- a/tests/language/final_variable_assignment_test.dart +++ b/tests/language/final_variable_assignment_test.dart @@ -6,8 +6,8 @@ main() { final x = 30; - x = 0; // //# 01: static type warning, runtime error - x += 1; // //# 02: static type warning, runtime error - ++x; // //# 03: static type warning, runtime error - x++; // //# 04: static type warning, runtime error + x = 0; // /// 01: static type warning, runtime error + x += 1; // /// 02: static type warning, runtime error + ++x; // /// 03: static type warning, runtime error + x++; // /// 04: static type warning, runtime error } diff --git a/tests/language/first_class_types_literals_test.dart b/tests/language/first_class_types_literals_test.dart index 0375245f82d..9a03628eb58 100644 --- a/tests/language/first_class_types_literals_test.dart +++ b/tests/language/first_class_types_literals_test.dart @@ -41,23 +41,23 @@ main() { Expect.equals(String, 'hest'.runtimeType); Expect.equals(double, (0.5).runtimeType); Expect.equals(bool, true.runtimeType); - Expect.equals(C, new C().runtimeType); // //# 01: ok - Expect.equals(D, new D().runtimeType); // //# 02: ok + Expect.equals(C, new C().runtimeType); // /// 01: ok + Expect.equals(D, new D().runtimeType); // /// 02: ok // runtimeType on type is idempotent. Expect.equals((D).runtimeType, (D).runtimeType.runtimeType); // Test that operator calls on class literals go to Type. - Expect.throws(() => C = 1, (e) => e is NoSuchMethodError); //# 03: static type warning - Expect.throws(() => C++, (e) => e is NoSuchMethodError); //# 04: static type warning - Expect.throws(() => C + 1, (e) => e is NoSuchMethodError); //# 05: static type warning - Expect.throws(() => C[2], (e) => e is NoSuchMethodError); //# 06: static type warning - Expect.throws(() => C[2] = 'hest', (e) => e is NoSuchMethodError); //# 07: static type warning - Expect.throws(() => dynamic = 1, (e) => e is NoSuchMethodError); //# 08: static type warning - Expect.throws(() => dynamic++, (e) => e is NoSuchMethodError); //# 09: static type warning - Expect.throws(() => dynamic + 1, (e) => e is NoSuchMethodError); //# 10: static type warning - Expect.throws(() => dynamic[2], (e) => e is NoSuchMethodError); //# 11: static type warning - Expect.throws(() => dynamic[2] = 'hest', (e) => e is NoSuchMethodError); //# 12: static type warning + Expect.throws(() => C = 1, (e) => e is NoSuchMethodError); /// 03: static type warning + Expect.throws(() => C++, (e) => e is NoSuchMethodError); /// 04: static type warning + Expect.throws(() => C + 1, (e) => e is NoSuchMethodError); /// 05: static type warning + Expect.throws(() => C[2], (e) => e is NoSuchMethodError); /// 06: static type warning + Expect.throws(() => C[2] = 'hest', (e) => e is NoSuchMethodError); /// 07: static type warning + Expect.throws(() => dynamic = 1, (e) => e is NoSuchMethodError); /// 08: static type warning + Expect.throws(() => dynamic++, (e) => e is NoSuchMethodError); /// 09: static type warning + Expect.throws(() => dynamic + 1, (e) => e is NoSuchMethodError); /// 10: static type warning + Expect.throws(() => dynamic[2], (e) => e is NoSuchMethodError); /// 11: static type warning + Expect.throws(() => dynamic[2] = 'hest', (e) => e is NoSuchMethodError); /// 12: static type warning Expect.equals((dynamic).toString(), 'dynamic'); } diff --git a/tests/language/fixed_type_variable2_test.dart b/tests/language/fixed_type_variable2_test.dart index 8f71a4ef722..157fae34320 100644 --- a/tests/language/fixed_type_variable2_test.dart +++ b/tests/language/fixed_type_variable2_test.dart @@ -32,12 +32,12 @@ class IntC extends C { } void main() { - testA(); //# 01: ok - testNumA(); //# 02: ok - testB(); //# 03: ok - testStringB(); //# 04: ok - testC(); //# 05: ok - testIntC(); //# 06: ok + testA(); /// 01: ok + testNumA(); /// 02: ok + testB(); /// 03: ok + testStringB(); /// 04: ok + testC(); /// 05: ok + testIntC(); /// 06: ok } void testA() { diff --git a/tests/language/fixed_type_variable_test.dart b/tests/language/fixed_type_variable_test.dart index ddfecdfec4e..e032fafc474 100644 --- a/tests/language/fixed_type_variable_test.dart +++ b/tests/language/fixed_type_variable_test.dart @@ -32,12 +32,12 @@ class IntC extends C { } void main() { - testA(); //# 01: ok - testNumA(); //# 02: ok - testB(); //# 03: ok - testStringB(); //# 04: ok - testC(); //# 05: ok - testIntC(); //# 06: ok + testA(); /// 01: ok + testNumA(); /// 02: ok + testB(); /// 03: ok + testStringB(); /// 04: ok + testC(); /// 05: ok + testIntC(); /// 06: ok } void testA() { diff --git a/tests/language/flatten_test.dart b/tests/language/flatten_test.dart index 0fa5c2405e9..eeb38803446 100644 --- a/tests/language/flatten_test.dart +++ b/tests/language/flatten_test.dart @@ -19,22 +19,22 @@ class Divergent implements Future>> { test() async { // flatten(Derived) = int - int x = await new Derived(); //# 01: runtime error - Future f() async => new Derived(); //# 02: ok - Future f() async { return new Derived(); } //# 03: ok - Future x = (() async => new Derived())(); //# 04: runtime error + int x = await new Derived(); /// 01: runtime error + Future f() async => new Derived(); /// 02: ok + Future f() async { return new Derived(); } /// 03: ok + Future x = (() async => new Derived())(); /// 04: runtime error // flatten(FixedPoint) = FixedPoint - FixedPoint x = await new FixedPoint(); //# 05: runtime error - Future> f() async => new FixedPoint(); //# 06: ok - Future> f() async { return new FixedPoint(); } //# 07: ok - Future> x = (() async => new FixedPoint())(); //# 08: runtime error + FixedPoint x = await new FixedPoint(); /// 05: runtime error + Future> f() async => new FixedPoint(); /// 06: ok + Future> f() async { return new FixedPoint(); } /// 07: ok + Future> x = (() async => new FixedPoint())(); /// 08: runtime error // flatten(Divergent) = Divergent> - Divergent> x = await new Divergent(); //# 09: runtime error - Future>> f() async => new Divergent(); //# 10: ok - Future>> f() async { return new Divergent(); } //# 11: ok - Future>> x = (() async => new Divergent())(); //# 12: runtime error + Divergent> x = await new Divergent(); /// 09: runtime error + Future>> f() async => new Divergent(); /// 10: ok + Future>> f() async { return new Divergent(); } /// 11: ok + Future>> x = (() async => new Divergent())(); /// 12: runtime error } main() { diff --git a/tests/language/function_syntax_test.dart b/tests/language/function_syntax_test.dart index fc9d92568d0..ff96445a07c 100644 --- a/tests/language/function_syntax_test.dart +++ b/tests/language/function_syntax_test.dart @@ -9,9 +9,9 @@ import "package:expect/expect.dart"; class FunctionSyntaxTest { static void testMain -/* //# 00: compile-time error +/* /// 00: compile-time error () -*/ //# 00: continued +*/ /// 00: continued { testNestedFunctions(); testFunctionExpressions(); @@ -23,25 +23,25 @@ class FunctionSyntaxTest { } static void testNestedFunctions -/* //# 01: compile-time error +/* /// 01: compile-time error () -*/ //# 01: continued +*/ /// 01: continued { // No types - braces. nb0 -/* //# 02: compile-time error +/* /// 02: compile-time error () -*/ //# 02: continued +*/ /// 02: continued { return 42; } nb1 -/* //# 03: compile-time error +/* /// 03: compile-time error (a) -*/ //# 03: continued +*/ /// 03: continued { return a; } nb2 -/* //# 04: compile-time error +/* /// 04: compile-time error (a, b) -*/ //# 04: continued +*/ /// 04: continued { return a + b; } Expect.equals(42, nb0()); Expect.equals(87, nb1(87)); @@ -49,19 +49,19 @@ class FunctionSyntaxTest { // No types - arrows. na0 -/* //# 05: compile-time error +/* /// 05: compile-time error () -*/ //# 05: continued +*/ /// 05: continued => 42; na1 -/* //# 06: compile-time error +/* /// 06: compile-time error (a) -*/ //# 06: continued +*/ /// 06: continued => a; na2 -/* //# 07: compile-time error +/* /// 07: compile-time error (a, b) -*/ //# 07: continued +*/ /// 07: continued => a + b; Expect.equals(42, na0()); Expect.equals(87, na1(87)); @@ -69,19 +69,19 @@ class FunctionSyntaxTest { // Return type - braces. int rb0 -/* //# 08: compile-time error +/* /// 08: compile-time error () -*/ //# 08: continued +*/ /// 08: continued { return 42; } int rb1 -/* //# 09: compile-time error +/* /// 09: compile-time error (a) -*/ //# 09: continued +*/ /// 09: continued { return a; } int rb2 -/* //# 10: compile-time error +/* /// 10: compile-time error (a, b) -*/ //# 10: continued +*/ /// 10: continued { return a + b; } Expect.equals(42, rb0()); Expect.equals(87, rb1(87)); @@ -89,19 +89,19 @@ class FunctionSyntaxTest { // Return type - arrows. int ra0 -/* //# 11: compile-time error +/* /// 11: compile-time error () -*/ //# 11: continued +*/ /// 11: continued => 42; int ra1 -/* //# 12: compile-time error +/* /// 12: compile-time error (a) -*/ //# 12: continued +*/ /// 12: continued => a; int ra2 -/* //# 13: compile-time error +/* /// 13: compile-time error (a, b) -*/ //# 13: continued +*/ /// 13: continued => a + b; Expect.equals(42, ra0()); Expect.equals(87, ra1(87)); @@ -109,14 +109,14 @@ class FunctionSyntaxTest { // Fully typed - braces. int fb1 -/* //# 14: compile-time error +/* /// 14: compile-time error (int a) -*/ //# 14: continued +*/ /// 14: continued { return a; } int fb2 -/* //# 15: compile-time error +/* /// 15: compile-time error (int a, int b) -*/ //# 15: continued +*/ /// 15: continued { return a + b; } Expect.equals(42, rb0()); Expect.equals(87, rb1(87)); @@ -124,14 +124,14 @@ class FunctionSyntaxTest { // Fully typed - arrows. int fa1 -/* //# 16: compile-time error +/* /// 16: compile-time error (int a) -*/ //# 16: continued +*/ /// 16: continued => a; int fa2 -/* //# 17: compile-time error +/* /// 17: compile-time error (int a, int b) -*/ //# 17: continued +*/ /// 17: continued => a + b; Expect.equals(42, ra0()); Expect.equals(87, ra1(87)); @@ -139,193 +139,193 @@ class FunctionSyntaxTest { // Generic types - braces. List gb0 -/* //# 18: compile-time error +/* /// 18: compile-time error () -*/ //# 18: continued +*/ /// 18: continued { return [42]; } List gb1 -/* //# 19: compile-time error +/* /// 19: compile-time error (List a) -*/ //# 19: continued +*/ /// 19: continued { return a; } Expect.equals(42, gb0()[0]); Expect.equals(87, gb1([87])[0]); // Generic types - arrows. List ga0 -/* //# 20: compile-time error +/* /// 20: compile-time error () -*/ //# 20: continued +*/ /// 20: continued => [42]; List ga1 -/* //# 21: compile-time error +/* /// 21: compile-time error (List a) -*/ //# 21: continued +*/ /// 21: continued => a; Expect.equals(42, ga0()[0]); Expect.equals(87, ga1([87])[0]); } static void testFunctionExpressions -/* //# 22: compile-time error +/* /// 22: compile-time error () -*/ //# 22: continued +*/ /// 22: continued { eval0 -/* //# 23: compile-time error +/* /// 23: compile-time error (fn) -*/ //# 23: continued +*/ /// 23: continued => fn(); eval1 -/* //# 24: compile-time error +/* /// 24: compile-time error (fn, a) -*/ //# 24: continued +*/ /// 24: continued => fn(a); eval2 -/* //# 25: compile-time error +/* /// 25: compile-time error (fn, a, b) -*/ //# 25: continued +*/ /// 25: continued => fn(a, b); // No types - braces. Expect.equals(42, eval0( -/* //# 26: compile-time error +/* /// 26: compile-time error () -*/ //# 26: continued +*/ /// 26: continued { return 42; })); Expect.equals(87, eval1( -/* //# 27: compile-time error +/* /// 27: compile-time error (a) -*/ //# 27: continued +*/ /// 27: continued { return a; }, 87)); Expect.equals(1 + 2, eval2( -/* //# 28: compile-time error +/* /// 28: compile-time error (a, b) -*/ //# 28: continued +*/ /// 28: continued { return a + b; }, 1, 2)); Expect.equals(42, eval0( -/* //# 29: compile-time error +/* /// 29: compile-time error () -*/ //# 29: continued +*/ /// 29: continued { return 42; })); Expect.equals(87, eval1( -/* //# 30: compile-time error +/* /// 30: compile-time error (a) -*/ //# 30: continued +*/ /// 30: continued { return a; }, 87)); Expect.equals(1 + 2, eval2( -/* //# 31: compile-time error +/* /// 31: compile-time error (a, b) -*/ //# 31: continued +*/ /// 31: continued { return a + b; }, 1, 2)); // No types - arrows. Expect.equals(42, eval0( -/* //# 32: compile-time error +/* /// 32: compile-time error () -*/ //# 32: continued +*/ /// 32: continued => 42)); Expect.equals(87, eval1( -/* //# 33: compile-time error +/* /// 33: compile-time error (a) -*/ //# 33: continued +*/ /// 33: continued => a, 87)); Expect.equals(1 + 2, eval2( -/* //# 34: compile-time error +/* /// 34: compile-time error (a, b) -*/ //# 34: continued +*/ /// 34: continued => a + b, 1, 2)); Expect.equals(42, eval0( -/* //# 35: compile-time error +/* /// 35: compile-time error () -*/ //# 35: continued +*/ /// 35: continued => 42)); Expect.equals(87, eval1( -/* //# 36: compile-time error +/* /// 36: compile-time error (a) -*/ //# 36: continued +*/ /// 36: continued => a, 87)); Expect.equals(1 + 2, eval2( -/* //# 37: compile-time error +/* /// 37: compile-time error (a, b) -*/ //# 37: continued +*/ /// 37: continued => a + b, 1, 2)); // Argument types - braces. Expect.equals(42, eval0( -/* //# 44: compile-time error +/* /// 44: compile-time error () -*/ //# 44: continued +*/ /// 44: continued { return 42; })); Expect.equals(87, eval1( -/* //# 45: compile-time error +/* /// 45: compile-time error (int a) -*/ //# 45: continued +*/ /// 45: continued { return a; }, 87)); Expect.equals(1 + 2, eval2( -/* //# 46: compile-time error +/* /// 46: compile-time error (int a, int b) -*/ //# 46: continued +*/ /// 46: continued { return a + b; }, 1, 2)); Expect.equals(42, eval0( -/* //# 47: compile-time error +/* /// 47: compile-time error () -*/ //# 47: continued +*/ /// 47: continued { return 42; })); Expect.equals(87, eval1( -/* //# 48: compile-time error +/* /// 48: compile-time error (int a) -*/ //# 48: continued +*/ /// 48: continued { return a; }, 87)); Expect.equals(1 + 2, eval2( -/* //# 49: compile-time error +/* /// 49: compile-time error (int a, int b) -*/ //# 49: continued +*/ /// 49: continued { return a + b; }, 1, 2)); // Argument types - arrows. Expect.equals(42, eval0( -/* //# 50: compile-time error +/* /// 50: compile-time error () -*/ //# 50: continued +*/ /// 50: continued => 42)); Expect.equals(87, eval1( -/* //# 51: compile-time error +/* /// 51: compile-time error (int a) -*/ //# 51: continued +*/ /// 51: continued => a, 87)); Expect.equals(1 + 2, eval2( -/* //# 52: compile-time error +/* /// 52: compile-time error (int a, int b) -*/ //# 52: continued +*/ /// 52: continued => a + b, 1, 2)); Expect.equals(42, eval0( -/* //# 53: compile-time error +/* /// 53: compile-time error () -*/ //# 53: continued +*/ /// 53: continued => 42)); Expect.equals(87, eval1( -/* //# 54: compile-time error +/* /// 54: compile-time error (int a) -*/ //# 54: continued +*/ /// 54: continued => a, 87)); Expect.equals(1 + 2, eval2( -/* //# 55: compile-time error +/* /// 55: compile-time error (int a, int b) -*/ //# 55: continued +*/ /// 55: continued => a + b, 1, 2)); } static void testPrecedence -/* //# 64: compile-time error +/* /// 64: compile-time error () -*/ //# 64: continued +*/ /// 64: continued { expectEvaluatesTo -/* //# 65: compile-time error +/* /// 65: compile-time error (value, fn) -*/ //# 65: continued +*/ /// 65: continued { Expect.equals(value, fn()); } // Assignment. @@ -403,9 +403,9 @@ class FunctionSyntaxTest { // Selector. fn -/* //# 66: compile-time error +/* /// 66: compile-time error () -*/ //# 66: continued +*/ /// 66: continued => 42; var list = [87]; expectEvaluatesTo(42, ()=> fn()); @@ -415,9 +415,9 @@ class FunctionSyntaxTest { } static void testInitializers -/* //# 67: compile-time error +/* /// 67: compile-time error () -*/ //# 67: continued +*/ /// 67: continued { Expect.equals(42, (new C.cb0().fn)()); Expect.equals(43, (new C.ca0().fn)()); @@ -448,9 +448,9 @@ class FunctionSyntaxTest { } static void testFunctionParameter -/* //# 68: compile-time error +/* /// 68: compile-time error () -*/ //# 68: continued +*/ /// 68: continued { f0(fn()) => fn(); Expect.equals(42, f0(()=> 42)); @@ -466,26 +466,26 @@ class FunctionSyntaxTest { } static void testFunctionIdentifierExpression -/* //# 69: compile-time error +/* /// 69: compile-time error () -*/ //# 69: continued +*/ /// 69: continued { Expect.equals(87, ( -/* //# 70: compile-time error +/* /// 70: compile-time error () -*/ //# 70: continued +*/ /// 70: continued => 87)()); } static void testFunctionIdentifierStatement -/* //# 71: compile-time error +/* /// 71: compile-time error () -*/ //# 71: continued +*/ /// 71: continued { function -/* //# 72: compile-time error +/* /// 72: compile-time error () -*/ //# 72: continued +*/ /// 72: continued => 42; Expect.equals(42, function()); Expect.equals(true, function is Function); @@ -533,9 +533,9 @@ class C { C.ra3() : fn = {'x': () => 69}['x'] { } static wrap -/* //# 73: compile-time error +/* /// 73: compile-time error (fn) -*/ //# 73: continued +*/ /// 73: continued { return fn; } final fn; @@ -543,9 +543,9 @@ class C { } main -/* //# 74: compile-time error +/* /// 74: compile-time error () -*/ //# 74: continued +*/ /// 74: continued { FunctionSyntaxTest.testMain(); } diff --git a/tests/language/function_type_alias5_test.dart b/tests/language/function_type_alias5_test.dart index 7f60a4ea7cd..8a3f1d33a7d 100644 --- a/tests/language/function_type_alias5_test.dart +++ b/tests/language/function_type_alias5_test.dart @@ -3,15 +3,15 @@ // BSD-style license that can be found in the LICENSE file. // Dart test for illegally self referencing function type alias. -typedef Handle Handle(String command); // //# 00: compile-time error +typedef Handle Handle(String command); // /// 00: compile-time error -typedef F(F x); // //# 01: compile-time error +typedef F(F x); // /// 01: compile-time error -typedef A(B x); // //# 02: compile-time error -typedef B(A x); // //# 02: continued +typedef A(B x); // /// 02: compile-time error +typedef B(A x); // /// 02: continued main() { - Handle h; // //# 00: continued - F f; // //# 01: continued - A f; // //# 02: continued + Handle h; // /// 00: continued + F f; // /// 01: continued + A f; // /// 02: continued } diff --git a/tests/language/function_type_alias6_test.dart b/tests/language/function_type_alias6_test.dart index 1efc22d4e45..3f89d58f387 100644 --- a/tests/language/function_type_alias6_test.dart +++ b/tests/language/function_type_alias6_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; typedef F(List - // //# 00: compile-time error + // /// 00: compile-time error x); typedef D C(); diff --git a/tests/language/function_type_alias7_test.dart b/tests/language/function_type_alias7_test.dart index dadb5878d9c..fe07e0e6a93 100644 --- a/tests/language/function_type_alias7_test.dart +++ b/tests/language/function_type_alias7_test.dart @@ -5,17 +5,17 @@ typedef void funcType([int arg]); -typedef void badFuncType([int arg = 0]); // //# 00: compile-time error +typedef void badFuncType([int arg = 0]); // /// 00: compile-time error -typedef void badFuncType({int arg: 0}); // //# 02: compile-time error +typedef void badFuncType({int arg: 0}); // /// 02: compile-time error class A - extends funcType // //# 01: compile-time error + extends funcType // /// 01: compile-time error { } main() { new A(); - badFuncType f; // //# 00: continued - badFuncType f; // //# 02: continued + badFuncType f; // /// 00: continued + badFuncType f; // /// 02: continued } diff --git a/tests/language/function_type_alias9_test.dart b/tests/language/function_type_alias9_test.dart index c865bead9e9..e0e2fdd2ff2 100644 --- a/tests/language/function_type_alias9_test.dart +++ b/tests/language/function_type_alias9_test.dart @@ -4,7 +4,7 @@ // Dart test for legally self referencing function type alias. typedef void F(List - // //# 00: compile-time error + // /// 00: compile-time error l); typedef void G(List l); diff --git a/tests/language/function_type_call_getter2_test.dart b/tests/language/function_type_call_getter2_test.dart index 3b0c4a41893..3a8660f86d4 100644 --- a/tests/language/function_type_call_getter2_test.dart +++ b/tests/language/function_type_call_getter2_test.dart @@ -24,26 +24,26 @@ main() { C c = new C(); final - Function // //# 00: static type warning, dynamic type error + Function // /// 00: static type warning, dynamic type error a2 = a; final - F // //# 01: static type warning, dynamic type error + F // /// 01: static type warning, dynamic type error a3 = a; final - Function // //# 02: static type warning, dynamic type error + Function // /// 02: static type warning, dynamic type error b2 = b; final - F // //# 03: static type warning, dynamic type error + F // /// 03: static type warning, dynamic type error b3 = b; final - Function // //# 04: static type warning, dynamic type error + Function // /// 04: static type warning, dynamic type error c2 = c; final - F // //# 05: static type warning, dynamic type error + F // /// 05: static type warning, dynamic type error c3 = c; } diff --git a/tests/language/generic_field_mixin6_test.dart b/tests/language/generic_field_mixin6_test.dart index 664246a9042..6bdb624d90c 100644 --- a/tests/language/generic_field_mixin6_test.dart +++ b/tests/language/generic_field_mixin6_test.dart @@ -7,7 +7,7 @@ import 'package:expect/expect.dart'; class M { - T field = 0; //# 01: static type warning + T field = 0; /// 01: static type warning } class A {} class C1 = Object with M; @@ -15,12 +15,12 @@ class C2 = Object with M; class C3 = Object with M; main() { - checkNoDynamicTypeError(() => new C1()); // //# 01: continued - checkDynamicTypeError(() => new C1()); //# 01: continued + checkNoDynamicTypeError(() => new C1()); // /// 01: continued + checkDynamicTypeError(() => new C1()); /// 01: continued - checkNoDynamicTypeError(() => new C2()); // //# 01: continued + checkNoDynamicTypeError(() => new C2()); // /// 01: continued - checkDynamicTypeError(() => new C3()); // //# 01: continued + checkDynamicTypeError(() => new C3()); // /// 01: continued } /// Returns `true` if the program is running in checked mode. diff --git a/tests/language/generic_function_typedef2_test.dart b/tests/language/generic_function_typedef2_test.dart index d0fac0c4d19..5dab10d9efe 100644 --- a/tests/language/generic_function_typedef2_test.dart +++ b/tests/language/generic_function_typedef2_test.dart @@ -9,33 +9,33 @@ class A {} typedef int F(); -typedef G = F; //# 00: compile-time error -typedef H = int; //# 01: compile-time error -typedef I = A; //# 02: compile-time error -typedef J = List; //# 03: compile-time error +typedef G = F; /// 00: compile-time error +typedef H = int; /// 01: compile-time error +typedef I = A; /// 02: compile-time error +typedef J = List; /// 03: compile-time error typedef K = Function(Function(A - // //# 04: static type warning + // /// 04: static type warning )); typedef L = Function({ - /* // //# 05: compile-time error + /* // /// 05: compile-time error bool - */ // //# 05: compile-time error + */ // /// 05: compile-time error x}); typedef M = Function({ - /* // //# 06: compile-time error + /* // /// 06: compile-time error bool - */ // //# 06: compile-time error + */ // /// 06: compile-time error int}); foo({bool int}) {} main() { bool b = true; - Expect.isFalse(b is G); // //# 00: continued - Expect.isFalse(b is H); // //# 01: continued - Expect.isFalse(b is I); // //# 02: continued - Expect.isFalse(b is J); // //# 03: continued - Expect.isFalse(b is K); // //# 04: continued + Expect.isFalse(b is G); // /// 00: continued + Expect.isFalse(b is H); // /// 01: continued + Expect.isFalse(b is I); // /// 02: continued + Expect.isFalse(b is J); // /// 03: continued + Expect.isFalse(b is K); // /// 04: continued Expect.isFalse(b is L); Expect.isFalse(b is M); Expect.isTrue(foo is M); diff --git a/tests/language/generic_metadata_test.dart b/tests/language/generic_metadata_test.dart index 042141c58b3..1210b93f69a 100644 --- a/tests/language/generic_metadata_test.dart +++ b/tests/language/generic_metadata_test.dart @@ -8,7 +8,7 @@ class C { const C(); } -@C() // //# 01: ok -@C() //# 02: compile-time error -@C() // //# 03: compile-time error +@C() // /// 01: ok +@C() /// 02: compile-time error +@C() // /// 03: compile-time error main() {} \ No newline at end of file diff --git a/tests/language/generic_method_types_test.dart b/tests/language/generic_method_types_test.dart index 14ced286dda..4db4ba2636d 100644 --- a/tests/language/generic_method_types_test.dart +++ b/tests/language/generic_method_types_test.dart @@ -44,7 +44,7 @@ test3() { } main() { - test1(); //# 01: ok - test2(); //# 02: ok - test3(); //# 03: ok + test1(); /// 01: ok + test2(); /// 02: ok + test3(); /// 03: ok } \ No newline at end of file diff --git a/tests/language/generic_methods_type_expression_test.dart b/tests/language/generic_methods_type_expression_test.dart index 2064584200c..fd9d2e33764 100644 --- a/tests/language/generic_methods_type_expression_test.dart +++ b/tests/language/generic_methods_type_expression_test.dart @@ -12,11 +12,11 @@ library generic_methods_type_expression_test; import "package:expect/expect.dart"; -bool f1(Object o) => o is T; // //# 01: static type warning +bool f1(Object o) => o is T; // /// 01: static type warning bool f2(Object o) => o is List; -bool f3(Object o) => o is! T; // //# 03: static type warning +bool f3(Object o) => o is! T; // /// 03: static type warning bool f4(Object o) => o is! List; @@ -42,12 +42,12 @@ class IsMap { main() { String s = "Hello!"; List ss = [s]; - Expect.throws(() => f1(42), (e) => e is TypeError); // //# 01: continued - Expect.throws(() => f1(42), (e) => e is TypeError); // //# 01: continued + Expect.throws(() => f1(42), (e) => e is TypeError); // /// 01: continued + Expect.throws(() => f1(42), (e) => e is TypeError); // /// 01: continued Expect.equals(f2([42]), true); Expect.equals(f2([42]), true); // `is List` is true. - Expect.throws(() => f3(42), (e) => e is TypeError); // //# 03: continued - Expect.throws(() => f3(42), (e) => e is TypeError); // //# 03: continued + Expect.throws(() => f3(42), (e) => e is TypeError); // /// 03: continued + Expect.throws(() => f3(42), (e) => e is TypeError); // /// 03: continued Expect.equals(f4([42]), false); Expect.equals(f4([42]), false); // `is! List` is false. Expect.equals(f5(s), s); // `s as dynamic == s` diff --git a/tests/language/get_set_syntax_test.dart b/tests/language/get_set_syntax_test.dart index 8e5db4e571a..4aa15c3a4c2 100644 --- a/tests/language/get_set_syntax_test.dart +++ b/tests/language/get_set_syntax_test.dart @@ -3,41 +3,41 @@ // BSD-style license that can be found in the LICENSE file. var get; -var get a; // //# 00: compile-time error -var get b, c; // //# 01: compile-time error +var get a; // /// 00: compile-time error +var get b, c; // /// 01: compile-time error var set; -var set d; // //# 02: compile-time error -var set e, f; // //# 03: compile-time error +var set d; // /// 02: compile-time error +var set e, f; // /// 03: compile-time error class C0 { var get; - var get a; // //# 04: compile-time error - var get b, c; // //# 05: compile-time error + var get a; // /// 04: compile-time error + var get b, c; // /// 05: compile-time error var set; - var set d; // //# 06: compile-time error - var set e, f; // //# 07: compile-time error + var set d; // /// 06: compile-time error + var set e, f; // /// 07: compile-time error } class C1 { List get; List get a; - List get b, c; // //# 09: compile-time error + List get b, c; // /// 09: compile-time error List set; - List set d; // //# 10: compile-time error - List set e, f; // //# 11: compile-time error + List set d; // /// 10: compile-time error + List set e, f; // /// 11: compile-time error } class C2 { List get; List get a; - List get b, c; //# 13: compile-time error + List get b, c; /// 13: compile-time error List set; - List set d; // //# 14: compile-time error - List set e, f; //# 15: compile-time error + List set d; // /// 14: compile-time error + List set e, f; /// 15: compile-time error } main() { diff --git a/tests/language/getter_no_setter2_test.dart b/tests/language/getter_no_setter2_test.dart index a798b7e9e93..412df61de5e 100644 --- a/tests/language/getter_no_setter2_test.dart +++ b/tests/language/getter_no_setter2_test.dart @@ -12,25 +12,25 @@ class Example { { bool flag_exception = false; try { - nextVar++; // //# 03: static type warning + nextVar++; // /// 03: static type warning } catch (excpt) { flag_exception = true; } - Expect.isTrue(flag_exception); // //# 03: continued + Expect.isTrue(flag_exception); // /// 03: continued } { bool flag_exception = false; try { - this.nextVar++; // //# 00: static type warning + this.nextVar++; // /// 00: static type warning } catch (excpt) { flag_exception = true; } - Expect.isTrue(flag_exception); // //# 00: continued + Expect.isTrue(flag_exception); // /// 00: continued } } static test() { - nextVar++; // //# 01: runtime error - this.nextVar++; // //# 02: compile-time error + nextVar++; // /// 01: runtime error + this.nextVar++; // /// 02: compile-time error } } diff --git a/tests/language/getter_no_setter_test.dart b/tests/language/getter_no_setter_test.dart index 78535f741f7..493dee5153d 100644 --- a/tests/language/getter_no_setter_test.dart +++ b/tests/language/getter_no_setter_test.dart @@ -21,16 +21,16 @@ class Example { { bool flag_exception = false; try { - this.nextVar = 1; // //# 00: static type warning + this.nextVar = 1; // /// 00: static type warning } catch (excpt) { flag_exception = true; } - Expect.isTrue(flag_exception); // //# 00: continued + Expect.isTrue(flag_exception); // /// 00: continued } } static test() { - nextVar = 0; // //# 01: runtime error - this.nextVar = 0; // //# 02: compile-time error + nextVar = 0; // /// 01: runtime error + this.nextVar = 0; // /// 02: compile-time error } } diff --git a/tests/language/getter_override2_test.dart b/tests/language/getter_override2_test.dart index 95519a28315..e4b41548c48 100644 --- a/tests/language/getter_override2_test.dart +++ b/tests/language/getter_override2_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: ok - get foo => 42; // //# 01: ok - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: ok + var foo = 42; // /// 00: ok + get foo => 42; // /// 01: ok + foo() => 42; // /// 02: compile-time error + set foo(value) { } // /// 03: ok } class B extends A { diff --git a/tests/language/getter_override_test.dart b/tests/language/getter_override_test.dart index 350da736484..de5a8e70e04 100644 --- a/tests/language/getter_override_test.dart +++ b/tests/language/getter_override_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: static type warning + var foo = 42; // /// 00: compile-time error + get foo => 42; // /// 01: compile-time error + foo() => 42; // /// 02: compile-time error + set foo(value) { } // /// 03: static type warning } class B extends A { diff --git a/tests/language/getter_parameters_test.dart b/tests/language/getter_parameters_test.dart index c98a98af753..491a82b86a4 100644 --- a/tests/language/getter_parameters_test.dart +++ b/tests/language/getter_parameters_test.dart @@ -6,16 +6,16 @@ get f1 => null; get f2 -() //# 01: compile-time error +() /// 01: compile-time error => null; get f3 -(arg) //# 02: compile-time error +(arg) /// 02: compile-time error => null; get f4 -([arg]) //# 03: compile-time error +([arg]) /// 03: compile-time error => null; get f5 -({arg}) //# 04: compile-time error +({arg}) /// 04: compile-time error => null; main() { diff --git a/tests/language/getters_setters2_test.dart b/tests/language/getters_setters2_test.dart index 7ce79f31a0c..8f62f05dc0d 100644 --- a/tests/language/getters_setters2_test.dart +++ b/tests/language/getters_setters2_test.dart @@ -29,7 +29,7 @@ class T2 { A get field { return getterField; } // Type C is not assignable to A - void set field(C arg) { setterField = arg; } //# 01: static type warning + void set field(C arg) { setterField = arg; } /// 01: static type warning } class T3 { @@ -42,12 +42,12 @@ class T3 { main() { T1 instance1 = new T1(); - T2 instance2 = new T2(); //# 01: continued + T2 instance2 = new T2(); /// 01: continued T3 instance3 = new T3(); instance1.field = new B(); A resultA = instance1.field; - instance1.field = new A(); //# 03: dynamic type error + instance1.field = new A(); /// 03: dynamic type error B resultB = instance1.field; int result; @@ -55,7 +55,7 @@ main() { Expect.equals(37, result); // Type 'A' has no method named 'b' - instance1.field.b(); //# 02: static type warning + instance1.field.b(); /// 02: static type warning instance3.field = new B(); result = instance3.field.a(); diff --git a/tests/language/getters_setters_type_test.dart b/tests/language/getters_setters_type_test.dart index ee28943402a..ae18c0664da 100644 --- a/tests/language/getters_setters_type_test.dart +++ b/tests/language/getters_setters_type_test.dart @@ -8,11 +8,11 @@ import "package:expect/expect.dart"; int bar = 499; -int // //# 01: static type warning +int // /// 01: static type warning get foo => bar; void set foo( - String // //# 01: continued + String // /// 01: continued str) { bar = str.length; } main() { diff --git a/tests/language/hidden_import_test.dart b/tests/language/hidden_import_test.dart index 6722fdf153b..26be79c6719 100644 --- a/tests/language/hidden_import_test.dart +++ b/tests/language/hidden_import_test.dart @@ -12,6 +12,6 @@ import 'dart:async'; import 'dart:async' as prefix; main() { - new Future(); //# 01: static type warning - new prefix.Future(); //# 02: static type warning + new Future(); /// 01: static type warning + new prefix.Future(); /// 02: static type warning } \ No newline at end of file diff --git a/tests/language/identical_const_test.dart b/tests/language/identical_const_test.dart index 17324f33de6..cd96244823b 100644 --- a/tests/language/identical_const_test.dart +++ b/tests/language/identical_const_test.dart @@ -14,13 +14,13 @@ const identical_gg = identical(g, g); // Verify proper compile time computation of identical() const a = const { - identical_ff: 0, //# 01: static type warning - identical_gg: 0, //# 02: static type warning + identical_ff: 0, /// 01: static type warning + identical_gg: 0, /// 02: static type warning true: 0 }; const b = const { - identical_fg: 0, //# 03: static type warning - identical_gf: 0, //# 04: static type warning + identical_fg: 0, /// 03: static type warning + identical_gf: 0, /// 04: static type warning false: 0 }; use(x) => x; @@ -30,8 +30,8 @@ main() { use(b); // Verify proper run time computation of identical() - Expect.isTrue(identical_ff); //# 05: ok - Expect.isTrue(identical_gg); //# 06: ok - Expect.isFalse(identical_fg); //# 07: ok - Expect.isFalse(identical_gf); //# 08: ok + Expect.isTrue(identical_ff); /// 05: ok + Expect.isTrue(identical_gg); /// 06: ok + Expect.isFalse(identical_fg); /// 07: ok + Expect.isFalse(identical_gf); /// 08: ok } diff --git a/tests/language/if_null_assignment_behavior_test.dart b/tests/language/if_null_assignment_behavior_test.dart index 200d40fb4ff..e8b2dd66b01 100644 --- a/tests/language/if_null_assignment_behavior_test.dart +++ b/tests/language/if_null_assignment_behavior_test.dart @@ -126,10 +126,10 @@ class C { void instanceTest() { // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - vGetValue = 1; check(1, () => v ??= bad(), ['$s.v']); //# 01: ok - yGetValue = 1; check(1, () => v ??= y, ['$s.v', 'y', '$s.v=1']); //# 02: ok - check(1, () => finalOne ??= bad(), []); //# 03: static type warning - yGetValue = 1; checkThrows(noMethod, () => finalNull ??= y, ['y']); //# 04: static type warning + vGetValue = 1; check(1, () => v ??= bad(), ['$s.v']); /// 01: ok + yGetValue = 1; check(1, () => v ??= y, ['$s.v', 'y', '$s.v=1']); /// 02: ok + check(1, () => finalOne ??= bad(), []); /// 03: static type warning + yGetValue = 1; checkThrows(noMethod, () => finalNull ??= y, ['y']); /// 04: static type warning } } @@ -145,8 +145,8 @@ class D extends C { void derivedInstanceTest() { // super.v ??= e is equivalent to // ((x) => x == null ? super.v = e : x)(super.v) - vGetValue = 1; check(1, () => super.v ??= bad(), ['$s.v']); //# 05: ok - yGetValue = 1; check(1, () => super.v ??= y, ['$s.v', 'y', '$s.v=1']); //# 06: ok + vGetValue = 1; check(1, () => super.v ??= bad(), ['$s.v']); /// 05: ok + yGetValue = 1; check(1, () => super.v ??= y, ['$s.v', 'y', '$s.v=1']); /// 06: ok } } @@ -159,56 +159,56 @@ main() { new D('d').derivedInstanceTest(); // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - xGetValue = 1; check(1, () => x ??= bad(), ['x']); //# 07: ok - yGetValue = 1; check(1, () => x ??= y, ['x', 'y', 'x=1']); //# 08: ok - h.xGetValue = 1; check(1, () => h.x ??= bad(), ['h.x']); //# 09: ok - yGetValue = 1; check(1, () => h.x ??= y, ['h.x', 'y', 'h.x=1']); //# 10: ok - { var l = 1; check(1, () => l ??= bad(), []); } //# 11: ok - { var l; yGetValue = 1; check(1, () => l ??= y, ['y']); Expect.equals(1, l); } //# 12: ok - { final l = 1; check(1, () => l ??= bad(), []); } //# 13: static type warning - { final l = null; yGetValue = 1; checkThrows(noMethod, () => l ??= y, ['y']); } //# 14: static type warning - check(C, () => C ??= bad(), []); //# 15: static type warning - h ??= null; //# 29: compile-time error - h[0] ??= null; //# 30: compile-time error + xGetValue = 1; check(1, () => x ??= bad(), ['x']); /// 07: ok + yGetValue = 1; check(1, () => x ??= y, ['x', 'y', 'x=1']); /// 08: ok + h.xGetValue = 1; check(1, () => h.x ??= bad(), ['h.x']); /// 09: ok + yGetValue = 1; check(1, () => h.x ??= y, ['h.x', 'y', 'h.x=1']); /// 10: ok + { var l = 1; check(1, () => l ??= bad(), []); } /// 11: ok + { var l; yGetValue = 1; check(1, () => l ??= y, ['y']); Expect.equals(1, l); } /// 12: ok + { final l = 1; check(1, () => l ??= bad(), []); } /// 13: static type warning + { final l = null; yGetValue = 1; checkThrows(noMethod, () => l ??= y, ['y']); } /// 14: static type warning + check(C, () => C ??= bad(), []); /// 15: static type warning + h ??= null; /// 29: compile-time error + h[0] ??= null; /// 30: compile-time error // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - C.xGetValue = 1; check(1, () => C.x ??= bad(), ['C.x']); //# 16: ok - yGetValue = 1; check(1, () => C.x ??= y, ['C.x', 'y', 'C.x=1']); //# 17: ok - h.C.xGetValue = 1; check(1, () => h.C.x ??= bad(), ['h.C.x']); //# 18: ok - yGetValue = 1; check(1, () => h.C.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); //# 19: ok + C.xGetValue = 1; check(1, () => C.x ??= bad(), ['C.x']); /// 16: ok + yGetValue = 1; check(1, () => C.x ??= y, ['C.x', 'y', 'C.x=1']); /// 17: ok + h.C.xGetValue = 1; check(1, () => h.C.x ??= bad(), ['h.C.x']); /// 18: ok + yGetValue = 1; check(1, () => h.C.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); /// 19: ok // e1.v ??= e2 is equivalent to // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - xGetValue = new C('x'); xGetValue.vGetValue = 1; //# 20: ok - check(1, () => x.v ??= bad(), ['x', 'x.v']); // //# 20: continued - xGetValue = new C('x'); yGetValue = 1; // //# 21: ok - check(1, () => x.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); //# 21: continued - fValue = new C('f()'); fValue.vGetValue = 1; // //# 22: ok - check(1, () => f().v ??= bad(), ['f()', 'f().v']); //# 22: continued - fValue = new C('f()'); yGetValue = 1; // //# 23: ok - check(1, () => f().v ??= y, ['f()', 'f().v', 'y', 'f().v=1']); //# 23: continued + xGetValue = new C('x'); xGetValue.vGetValue = 1; /// 20: ok + check(1, () => x.v ??= bad(), ['x', 'x.v']); // /// 20: continued + xGetValue = new C('x'); yGetValue = 1; // /// 21: ok + check(1, () => x.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); /// 21: continued + fValue = new C('f()'); fValue.vGetValue = 1; // /// 22: ok + check(1, () => f().v ??= bad(), ['f()', 'f().v']); /// 22: continued + fValue = new C('f()'); yGetValue = 1; // /// 23: ok + check(1, () => f().v ??= y, ['f()', 'f().v', 'y', 'f().v=1']); /// 23: continued // e1[e2] ??= e3 is equivalent to // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - xGetValue = new C('x'); yGetValue = 1; xGetValue.indexGetValue = 2; //# 24: ok - check(2, () => x[y] ??= bad(), ['x', 'y', 'x[1]']); // //# 24: continued - xGetValue = new C('x'); yGetValue = 1; zGetValue = 2; // //# 25: ok - check(2, () => x[y] ??= z, ['x', 'y', 'x[1]', 'z', 'x[1]=2']); //# 25: continued + xGetValue = new C('x'); yGetValue = 1; xGetValue.indexGetValue = 2; /// 24: ok + check(2, () => x[y] ??= bad(), ['x', 'y', 'x[1]']); // /// 24: continued + xGetValue = new C('x'); yGetValue = 1; zGetValue = 2; // /// 25: ok + check(2, () => x[y] ??= z, ['x', 'y', 'x[1]', 'z', 'x[1]=2']); /// 25: continued // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - check(null, () => x?.v ??= bad(), ['x']); //# 26: ok - xGetValue = new C('x'); xGetValue.vGetValue = 1; //# 27: ok - check(1, () => x?.v ??= bad(), ['x', 'x.v']); // //# 27: continued - xGetValue = new C('x'); yGetValue = 1; // //# 28: ok - check(1, () => x?.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); //# 28: continued + check(null, () => x?.v ??= bad(), ['x']); /// 26: ok + xGetValue = new C('x'); xGetValue.vGetValue = 1; /// 27: ok + check(1, () => x?.v ??= bad(), ['x', 'x.v']); // /// 27: continued + xGetValue = new C('x'); yGetValue = 1; // /// 28: ok + check(1, () => x?.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); /// 28: continued // C?.v ??= e2 is equivalent to C.v ??= e2. - C.xGetValue = 1; // //# 29: ok - check(1, () => C?.x ??= bad(), ['C.x']); //# 29: continued - h.C.xgetValue = 1; // //# 30: ok - check(1, () => h.c?.x ??= bad(), ['h.C.x']); //# 30: continued - yGetValue = 1; // //# 31: ok - check(1, () => C?.x ??= y, ['C.x', 'y', 'C.x=1']); //# 31: continued - yGetValue = 1; // //# 32: ok - check(1, () => h.C?.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); //# 32: continued + C.xGetValue = 1; // /// 29: ok + check(1, () => C?.x ??= bad(), ['C.x']); /// 29: continued + h.C.xgetValue = 1; // /// 30: ok + check(1, () => h.c?.x ??= bad(), ['h.C.x']); /// 30: continued + yGetValue = 1; // /// 31: ok + check(1, () => C?.x ??= y, ['C.x', 'y', 'C.x=1']); /// 31: continued + yGetValue = 1; // /// 32: ok + check(1, () => h.C?.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); /// 32: continued } diff --git a/tests/language/if_null_assignment_static_test.dart b/tests/language/if_null_assignment_static_test.dart index 3aeeb9aaf80..9a651cf553c 100644 --- a/tests/language/if_null_assignment_static_test.dart +++ b/tests/language/if_null_assignment_static_test.dart @@ -76,17 +76,17 @@ class DerivedClass extends ClassWithInstanceGetters { void derivedTest() { // The static type of super.v ??= e is the LUB of the static types of // super.v and e. - (super.a ??= new A()).a; //# 01: ok - Expect.throws(() => (super.a ??= new A()).b, noMethod); //# 02: static type warning - (super.a ??= new B()).a; //# 03: ok - (super.a ??= new B()).b; //# 04: static type warning + (super.a ??= new A()).a; /// 01: ok + Expect.throws(() => (super.a ??= new A()).b, noMethod); /// 02: static type warning + (super.a ??= new B()).a; /// 03: ok + (super.a ??= new B()).b; /// 04: static type warning if (!checkedMode) { - (super.b ??= new A()).a; //# 05: ok - Expect.throws(() => (super.b ??= new A()).b, noMethod); //# 06: static type warning + (super.b ??= new A()).a; /// 05: ok + Expect.throws(() => (super.b ??= new A()).b, noMethod); /// 06: static type warning // Exactly the same static warnings that would be caused by super.v = e // are also generated in the case of super.v ??= e. - super.b ??= new C(); //# 07: static type warning + super.b ??= new C(); /// 07: static type warning } } } @@ -99,76 +99,76 @@ main() { new DerivedClass().derivedTest(); // The static type of v ??= e is the LUB of the static types of v and e. - (a ??= new A()).a; //# 08: ok - Expect.throws(() => (a ??= new A()).b, noMethod); //# 09: static type warning - (a ??= new B()).a; //# 10: ok - (a ??= new B()).b; //# 11: static type warning + (a ??= new A()).a; /// 08: ok + Expect.throws(() => (a ??= new A()).b, noMethod); /// 09: static type warning + (a ??= new B()).a; /// 10: ok + (a ??= new B()).b; /// 11: static type warning if (!checkedMode) { - (b ??= new A()).a; //# 12: ok - Expect.throws(() => (b ??= new A()).b, noMethod); //# 13: static type warning + (b ??= new A()).a; /// 12: ok + Expect.throws(() => (b ??= new A()).b, noMethod); /// 13: static type warning // Exactly the same static warnings that would be caused by v = e are also // generated in the case of v ??= e. - b ??= new C(); //# 14: static type warning + b ??= new C(); /// 14: static type warning } // The static type of C.v ??= e is the LUB of the static types of C.v and e. - (ClassWithStaticGetters.a ??= new A()).a; //# 15: ok - Expect.throws(() => (ClassWithStaticGetters.a ??= new A()).b, noMethod); //# 16: static type warning - (ClassWithStaticGetters.a ??= new B()).a; //# 17: ok - (ClassWithStaticGetters.a ??= new B()).b; //# 18: static type warning + (ClassWithStaticGetters.a ??= new A()).a; /// 15: ok + Expect.throws(() => (ClassWithStaticGetters.a ??= new A()).b, noMethod); /// 16: static type warning + (ClassWithStaticGetters.a ??= new B()).a; /// 17: ok + (ClassWithStaticGetters.a ??= new B()).b; /// 18: static type warning if (!checkedMode) { - (ClassWithStaticGetters.b ??= new A()).a; //# 19: ok - Expect.throws(() => (ClassWithStaticGetters.b ??= new A()).b, noMethod); //# 20: static type warning + (ClassWithStaticGetters.b ??= new A()).a; /// 19: ok + Expect.throws(() => (ClassWithStaticGetters.b ??= new A()).b, noMethod); /// 20: static type warning // Exactly the same static warnings that would be caused by C.v = e are // also generated in the case of C.v ??= e. - ClassWithStaticGetters.b ??= new C(); //# 21: static type warning + ClassWithStaticGetters.b ??= new C(); /// 21: static type warning } // The static type of e1.v ??= e2 is the LUB of the static types of e1.v and // e2. - (new ClassWithInstanceGetters().a ??= new A()).a; //# 22: ok - Expect.throws(() => (new ClassWithInstanceGetters().a ??= new A()).b, noMethod); //# 23: static type warning - (new ClassWithInstanceGetters().a ??= new B()).a; //# 24: ok - (new ClassWithInstanceGetters().a ??= new B()).b; //# 25: static type warning + (new ClassWithInstanceGetters().a ??= new A()).a; /// 22: ok + Expect.throws(() => (new ClassWithInstanceGetters().a ??= new A()).b, noMethod); /// 23: static type warning + (new ClassWithInstanceGetters().a ??= new B()).a; /// 24: ok + (new ClassWithInstanceGetters().a ??= new B()).b; /// 25: static type warning if (!checkedMode) { - (new ClassWithInstanceGetters().b ??= new A()).a; //# 26: ok - Expect.throws(() => (new ClassWithInstanceGetters().b ??= new A()).b, noMethod); //# 27: static type warning + (new ClassWithInstanceGetters().b ??= new A()).a; /// 26: ok + Expect.throws(() => (new ClassWithInstanceGetters().b ??= new A()).b, noMethod); /// 27: static type warning // Exactly the same static warnings that would be caused by e1.v = e2 are // also generated in the case of e1.v ??= e2. - new ClassWithInstanceGetters().b ??= new C(); //# 28: static type warning + new ClassWithInstanceGetters().b ??= new C(); /// 28: static type warning } // The static type of e1[e2] ??= e3 is the LUB of the static types of e1[e2] // and e3. - (([null])[0] ??= new A()).a; //# 29: ok - Expect.throws(() => (([null])[0] ??= new A()).b, noMethod); //# 30: static type warning - (([null])[0] ??= new B()).a; //# 31: ok - (([null])[0] ??= new B()).b; //# 32: static type warning + (([null])[0] ??= new A()).a; /// 29: ok + Expect.throws(() => (([null])[0] ??= new A()).b, noMethod); /// 30: static type warning + (([null])[0] ??= new B()).a; /// 31: ok + (([null])[0] ??= new B()).b; /// 32: static type warning if (!checkedMode) { - (([null])[0] ??= new A()).a; //# 33: ok - Expect.throws(() => (([null])[0] ??= new A()).b, noMethod); //# 34: static type warning + (([null])[0] ??= new A()).a; /// 33: ok + Expect.throws(() => (([null])[0] ??= new A()).b, noMethod); /// 34: static type warning // Exactly the same static warnings that would be caused by e1[e2] = e3 are // also generated in the case of e1[e2] ??= e3. - ([null])[0] ??= new C(); //# 35: static type warning + ([null])[0] ??= new C(); /// 35: static type warning } // The static type of e1?.v op= e2 is the static type of e1.v op e2, // therefore the static type of e1?.v ??= e2 is the static type of // e1.v ?? e2, which is the LUB of the static types of e1?.v and e2. - (new ClassWithInstanceGetters()?.a ??= new A()).a; //# 36: ok - Expect.throws(() => (new ClassWithInstanceGetters()?.a ??= new A()).b, noMethod); //# 37: static type warning - (new ClassWithInstanceGetters()?.a ??= new B()).a; //# 38: ok - (new ClassWithInstanceGetters()?.a ??= new B()).b; //# 39: static type warning + (new ClassWithInstanceGetters()?.a ??= new A()).a; /// 36: ok + Expect.throws(() => (new ClassWithInstanceGetters()?.a ??= new A()).b, noMethod); /// 37: static type warning + (new ClassWithInstanceGetters()?.a ??= new B()).a; /// 38: ok + (new ClassWithInstanceGetters()?.a ??= new B()).b; /// 39: static type warning if (!checkedMode) { - (new ClassWithInstanceGetters()?.b ??= new A()).a; //# 40: ok - Expect.throws(() => (new ClassWithInstanceGetters()?.b ??= new A()).b, noMethod); //# 41: static type warning + (new ClassWithInstanceGetters()?.b ??= new A()).a; /// 40: ok + Expect.throws(() => (new ClassWithInstanceGetters()?.b ??= new A()).b, noMethod); /// 41: static type warning // Exactly the same static warnings that would be caused by e1.v ??= e2 are // also generated in the case of e1?.v ??= e2. - new ClassWithInstanceGetters()?.b ??= new C(); //# 42: static type warning + new ClassWithInstanceGetters()?.b ??= new C(); /// 42: static type warning } } diff --git a/tests/language/if_null_behavior_test.dart b/tests/language/if_null_behavior_test.dart index 6ad6d5271cb..c023d891433 100644 --- a/tests/language/if_null_behavior_test.dart +++ b/tests/language/if_null_behavior_test.dart @@ -34,20 +34,20 @@ main() { // status files easier to maintain. var _ = null ?? null; - Expect.equals(1, 1 ?? 2); //# 01: ok - Expect.equals(1, 1 ?? null); //# 02: ok - Expect.equals(2, null ?? 2); //# 03: ok - Expect.equals(null, null ?? null); //# 04: ok - Expect.equals('B', (new B('B') ?? new C('C')).a); //# 05: ok - Expect.equals('B', (new B('B') ?? new C('C')).b); //# 06: static type warning - Expect.throws(() => (new B('B') ?? new C('C')).c, noMethod); //# 07: static type warning - Expect.equals('B', (new B('B') ?? nullC()).a); //# 08: ok - Expect.equals('B', (new B('B') ?? nullC()).b); //# 09: static type warning - Expect.throws(() => (new B('B') ?? nullC()).c, noMethod); //# 10: static type warning - Expect.equals('C', (nullB() ?? new C('C')).a); //# 11: ok - Expect.throws(() => (nullB() ?? new C('C')).b, noMethod); //# 12: static type warning - Expect.equals('C', (nullB() ?? new C('C')).c); //# 13: static type warning - Expect.throws(() => (nullB() ?? nullC()).a, noMethod); //# 14: ok - Expect.throws(() => (nullB() ?? nullC()).b, noMethod); //# 15: static type warning - Expect.throws(() => (nullB() ?? nullC()).c, noMethod); //# 16: static type warning + Expect.equals(1, 1 ?? 2); /// 01: ok + Expect.equals(1, 1 ?? null); /// 02: ok + Expect.equals(2, null ?? 2); /// 03: ok + Expect.equals(null, null ?? null); /// 04: ok + Expect.equals('B', (new B('B') ?? new C('C')).a); /// 05: ok + Expect.equals('B', (new B('B') ?? new C('C')).b); /// 06: static type warning + Expect.throws(() => (new B('B') ?? new C('C')).c, noMethod); /// 07: static type warning + Expect.equals('B', (new B('B') ?? nullC()).a); /// 08: ok + Expect.equals('B', (new B('B') ?? nullC()).b); /// 09: static type warning + Expect.throws(() => (new B('B') ?? nullC()).c, noMethod); /// 10: static type warning + Expect.equals('C', (nullB() ?? new C('C')).a); /// 11: ok + Expect.throws(() => (nullB() ?? new C('C')).b, noMethod); /// 12: static type warning + Expect.equals('C', (nullB() ?? new C('C')).c); /// 13: static type warning + Expect.throws(() => (nullB() ?? nullC()).a, noMethod); /// 14: ok + Expect.throws(() => (nullB() ?? nullC()).b, noMethod); /// 15: static type warning + Expect.throws(() => (nullB() ?? nullC()).c, noMethod); /// 16: static type warning } diff --git a/tests/language/if_null_evaluation_order_test.dart b/tests/language/if_null_evaluation_order_test.dart index 5cfc2644395..9ebdafdaea9 100644 --- a/tests/language/if_null_evaluation_order_test.dart +++ b/tests/language/if_null_evaluation_order_test.dart @@ -31,6 +31,6 @@ main() { // status files easier to maintain. var _ = null ?? null; - Expect.equals(1, 1 ?? bad()); //# 01: ok - Expect.equals(2, first() ?? second()); //# 02: ok + Expect.equals(1, 1 ?? bad()); /// 01: ok + Expect.equals(2, first() ?? second()); /// 02: ok } diff --git a/tests/language/if_null_precedence_test.dart b/tests/language/if_null_precedence_test.dart index 95dcb5bb807..62033d310b7 100644 --- a/tests/language/if_null_precedence_test.dart +++ b/tests/language/if_null_precedence_test.dart @@ -26,39 +26,39 @@ main() { // "a ?? b ?? c" should be legal, and should evaluate to the first non-null // value (or null if there are no non-null values). - Expect.equals(1, 1 ?? 2 ?? 3); //# 01: ok - Expect.equals(2, null ?? 2 ?? 3); //# 02: ok - Expect.equals(3, null ?? null ?? 3); //# 03: ok - Expect.equals(null, null ?? null ?? null); //# 04: ok + Expect.equals(1, 1 ?? 2 ?? 3); /// 01: ok + Expect.equals(2, null ?? 2 ?? 3); /// 02: ok + Expect.equals(3, null ?? null ?? 3); /// 03: ok + Expect.equals(null, null ?? null ?? null); /// 04: ok // "a ?? b ? c : d" should parse as "(a ?? b) ? c : d", therefore provided // that a is true, b need not be a bool. An incorrect parse of // "a ?? (b ? c : d)" would require b to be a bool to avoid a static type // warning. - Expect.equals(2, true ?? 1 ? 2 : 3); //# 05: ok + Expect.equals(2, true ?? 1 ? 2 : 3); /// 05: ok // "a ?? b || c" should parse as "a ?? (b || c)", therefore it's a static // type warning if b doesn't have type bool. An incorrect parse of // "(a ?? b) || c" would allow b to have any type provided that a is bool. - Expect.equals(false, false ?? 1 || true); //# 06: static type warning + Expect.equals(false, false ?? 1 || true); /// 06: static type warning // "a || b ?? c" should parse as "(a || b) ?? c", therefore it is a static // type warning if b doesn't have type bool. An incorrect parse of // "a || (b ?? c)" would allow b to have any type provided that c is bool. if (checkedMode) { - Expect.throws(() => false || 1 ?? true, assertionError); //# 07: static type warning + Expect.throws(() => false || 1 ?? true, assertionError); /// 07: static type warning } else { - Expect.equals(false, false || 1 ?? true); // //# 07: continued + Expect.equals(false, false || 1 ?? true); // /// 07: continued } if (checkedMode) { // An incorrect parse of "a || (b ?? c)" would result in no checked-mode // error. - Expect.throws(() => false || null ?? true, assertionError); //# 08: ok + Expect.throws(() => false || null ?? true, assertionError); /// 08: ok } else { // An incorrect parse of "a || (b ?? c)" would result in c being evaluated. - int i = 0; // //# 08: continued - Expect.equals(false, false || null ?? i++ == 0); // //# 08: continued - Expect.equals(0, i); // //# 08: continued + int i = 0; // /// 08: continued + Expect.equals(false, false || null ?? i++ == 0); // /// 08: continued + Expect.equals(0, i); // /// 08: continued } } diff --git a/tests/language/illegal_declaration_test.dart b/tests/language/illegal_declaration_test.dart index 1b935f98ca7..25411518c3a 100644 --- a/tests/language/illegal_declaration_test.dart +++ b/tests/language/illegal_declaration_test.dart @@ -2,6 +2,6 @@ // 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. -[ // //# 01: compile-time error +[ // /// 01: compile-time error main() {} diff --git a/tests/language/illegal_initializer_test.dart b/tests/language/illegal_initializer_test.dart index de993c4aaf4..1158f23ab45 100644 --- a/tests/language/illegal_initializer_test.dart +++ b/tests/language/illegal_initializer_test.dart @@ -9,29 +9,29 @@ class A { class B extends A { B.c1() : super.foo - /* // //# 01: compile-time error + /* // /// 01: compile-time error () - */ // //# 01: continued + */ // /// 01: continued ; B.foo(); B.c2() : this.foo - /* // //# 02: compile-time error + /* // /// 02: compile-time error () - */ // //# 02: continued + */ // /// 02: continued ; B.c3() : super - /* // //# 03: compile-time error + /* // /// 03: compile-time error () - */ // //# 03: continued + */ // /// 03: continued ; B(); B.c4() : this - /* // //# 04: compile-time error + /* // /// 04: compile-time error () - */ // //# 04: continued + */ // /// 04: continued ; } diff --git a/tests/language/illegal_invocation_test.dart b/tests/language/illegal_invocation_test.dart index b0072413c0e..1feb33d2c7d 100644 --- a/tests/language/illegal_invocation_test.dart +++ b/tests/language/illegal_invocation_test.dart @@ -6,10 +6,10 @@ // Test for issue 1393. Invoking a library prefix name caused an internal error // in dartc. -import "illegal_invocation_lib.dart" as foo; // //# 01: compile-time error +import "illegal_invocation_lib.dart" as foo; // /// 01: compile-time error main() { // probably what the user meant was foo.foo(), but the qualifier refers // to the library prefix, not the method defined within the library. - foo(); // //# 01: continued + foo(); // /// 01: continued } diff --git a/tests/language/implicit_this_test.dart b/tests/language/implicit_this_test.dart index 51c2583f538..490e7e1c2dd 100644 --- a/tests/language/implicit_this_test.dart +++ b/tests/language/implicit_this_test.dart @@ -14,7 +14,7 @@ abstract class Abstract implements Interface { // This class does not implement "x" either, but it is not marked // abstract. -class SubAbstract1 extends Abstract { } //# 01: static type warning +class SubAbstract1 extends Abstract { } /// 01: static type warning // This class is implicitly abstract as it declares an abstract getter // method. @@ -24,7 +24,7 @@ class SubAbstract2 extends Abstract { // This class does not implement "x" either, but it is not marked // abstract. -class SubSubAbstract2 extends SubAbstract2 { } //# 04: static type warning +class SubSubAbstract2 extends SubAbstract2 { } /// 04: static type warning class Concrete extends Abstract { get x => 7; @@ -36,11 +36,11 @@ class SubConcrete extends Concrete { } void main() { - var x = new Abstract(); //# 02: runtime error - var y = new SubAbstract1(); //# 01: continued + var x = new Abstract(); /// 02: runtime error + var y = new SubAbstract1(); /// 01: continued var z = new SubAbstract2(); - var a = new SubSubAbstract2(); //# 04: continued - Expect.equals(x, x); //# 02: continued + var a = new SubSubAbstract2(); /// 04: continued + Expect.equals(x, x); /// 02: continued Expect.equals('7', new Concrete().toString()); Expect.equals('42', new SubConcrete(42).toString()); Expect.equals('7', new SubConcrete(new Concrete()).toString()); diff --git a/tests/language/import_combinators_part.dart b/tests/language/import_combinators_part.dart index c1dea972bed..1e49a6cd6fe 100644 --- a/tests/language/import_combinators_part.dart +++ b/tests/language/import_combinators_part.dart @@ -5,7 +5,7 @@ // This file is part of the test import_combinators_test.dart // VM ignores the library name. -part of Foo; // //# static warning +part of Foo; // /// static warning lookBehindCurtain() { return show; // show is an imported identifier. diff --git a/tests/language/import_private_test.dart b/tests/language/import_private_test.dart index 2720eeb5096..21d3a140c63 100644 --- a/tests/language/import_private_test.dart +++ b/tests/language/import_private_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // Check that private dart:_ libraries cannot be imported. -import "dart:_internal"; // //# 01: compile-time error +import "dart:_internal"; // /// 01: compile-time error main() { print("Done."); diff --git a/tests/language/import_self_test.dart b/tests/language/import_self_test.dart index 977efa6779d..ae25bc0e72d 100644 --- a/tests/language/import_self_test.dart +++ b/tests/language/import_self_test.dart @@ -11,7 +11,7 @@ import "package:expect/expect.dart"; // Eliminate the import of the unmodified file or else the analyzer // will generate the static warning in the import_self_test_none case. -import "import_self_test.dart" as p; // //# 01: continued +import "import_self_test.dart" as p; // /// 01: continued var _x = "The quick brown fox jumps over the dazy log"; @@ -21,8 +21,8 @@ main() { // Check that referencing p._x causes a warning from the analyzer, // and the runtime fails to resolve p._x, even though it refers to // top level variable _x of this file. - Expect.throws(() { t = p._x; }, // //# 01: static type warning - (e) => e is NoSuchMethodError); // //# 01: continued + Expect.throws(() { t = p._x; }, // /// 01: static type warning + (e) => e is NoSuchMethodError); // /// 01: continued Expect.isTrue(t.endsWith("Zwerg")); } diff --git a/tests/language/inferrer_constructor5_test.dart b/tests/language/inferrer_constructor5_test.dart index 7c416f491f5..37b62f1084d 100644 --- a/tests/language/inferrer_constructor5_test.dart +++ b/tests/language/inferrer_constructor5_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; class A { A() { - print(field + 42); //# 01: static type warning + print(field + 42); /// 01: static type warning } } @@ -18,5 +18,5 @@ class B extends A { } main() { - Expect.throws(() => new B(), (e) => e is NoSuchMethodError); //# 01: continued + Expect.throws(() => new B(), (e) => e is NoSuchMethodError); /// 01: continued } diff --git a/tests/language/instanceof4_test.dart b/tests/language/instanceof4_test.dart index 4392be8dbbd..923a3eadbe6 100644 --- a/tests/language/instanceof4_test.dart +++ b/tests/language/instanceof4_test.dart @@ -22,23 +22,23 @@ testFooString() { Expect.isTrue(!o.isNotT()); Expect.isTrue(o.isListT()); Expect.isTrue(!o.isNotListT()); - Expect.isTrue(!o.isAlsoListT()); // //# 01: ok - Expect.isTrue(o.isNeitherListT()); // //# 01: ok + Expect.isTrue(!o.isAlsoListT()); // /// 01: ok + Expect.isTrue(o.isNeitherListT()); // /// 01: ok for (var i = 0; i < 20; i++) { // Make sure methods are optimized. o.isT(); o.isNotT(); o.isListT(); o.isNotListT(); - o.isAlsoListT(); // //# 01: ok - o.isNeitherListT(); // //# 01: ok + o.isAlsoListT(); // /// 01: ok + o.isNeitherListT(); // /// 01: ok } Expect.isTrue(o.isT(), "1"); Expect.isTrue(!o.isNotT(), "2"); Expect.isTrue(o.isListT(), "3"); Expect.isTrue(!o.isNotListT(), "4"); - Expect.isTrue(!o.isAlsoListT(), "5"); // //# 01: ok - Expect.isTrue(o.isNeitherListT(), "6"); // //# 01: ok + Expect.isTrue(!o.isAlsoListT(), "5"); // /// 01: ok + Expect.isTrue(o.isNeitherListT(), "6"); // /// 01: ok } testFooInt() { diff --git a/tests/language/instantiate_type_variable_test.dart b/tests/language/instantiate_type_variable_test.dart index 65ef440b933..b56592f10f8 100644 --- a/tests/language/instantiate_type_variable_test.dart +++ b/tests/language/instantiate_type_variable_test.dart @@ -7,7 +7,7 @@ class Foo { Foo() {} T make() { - return new T(); // //# 01: runtime error + return new T(); // /// 01: runtime error } } diff --git a/tests/language/interface_cycle_test.dart b/tests/language/interface_cycle_test.dart index 0e44708fa26..f0480bb7fda 100644 --- a/tests/language/interface_cycle_test.dart +++ b/tests/language/interface_cycle_test.dart @@ -8,11 +8,11 @@ class C implements B {} class A implements B {} class B - implements A // //# 01: compile-time error - implements A // //# 02: compile-time error + implements A // /// 01: compile-time error + implements A // /// 02: compile-time error {} main() { - new C(); // //# 01: continued - new List(); // //# 02: continued + new C(); // /// 01: continued + new List(); // /// 02: continued } diff --git a/tests/language/interface_test.dart b/tests/language/interface_test.dart index 14ea335994c..cb475a70623 100644 --- a/tests/language/interface_test.dart +++ b/tests/language/interface_test.dart @@ -37,5 +37,5 @@ class InterfaceTest implements Ai, Aai, Abi, Baz, Bi { main() { // instantiate an abstract class - var o = new Bi(); //# 00: static type warning + var o = new Bi(); /// 00: static type warning } diff --git a/tests/language/internal_library_test.dart b/tests/language/internal_library_test.dart index 9c781ce546d..55eacd00db8 100644 --- a/tests/language/internal_library_test.dart +++ b/tests/language/internal_library_test.dart @@ -7,11 +7,11 @@ library internal_library_test; import 'dart:core'; // This loads 'dart:_foreign_helper' and 'patch:core'. -import 'dart:_foreign_helper'; //# 01: compile-time error +import 'dart:_foreign_helper'; /// 01: compile-time error -part 'dart:_foreign_helper'; //# 02: compile-time error +part 'dart:_foreign_helper'; /// 02: compile-time error void main() { - JS('int', '0'); //# 01: continued - JS('int', '0'); //# 02: continued + JS('int', '0'); /// 01: continued + JS('int', '0'); /// 02: continued } \ No newline at end of file diff --git a/tests/language/is_malformed_type_test.dart b/tests/language/is_malformed_type_test.dart index 6c85bbac4fd..99c8efa1adc 100644 --- a/tests/language/is_malformed_type_test.dart +++ b/tests/language/is_malformed_type_test.dart @@ -12,7 +12,7 @@ test99(e) { // Test that a runtime error is thrown when the 'is' operator checks for a // malformed type. try { - if (e is Undefined) Expect.fail("unreachable"); // //# 99: continued + if (e is Undefined) Expect.fail("unreachable"); // /// 99: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -23,7 +23,7 @@ test98(e) { // Test that a runtime error is thrown when the 'as' operator checks for a // malformed type. try { - if (e as Undefined) Expect.fail("unreachable"); // //# 98: continued + if (e as Undefined) Expect.fail("unreachable"); // /// 98: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -36,7 +36,7 @@ test97(e) { // with malformed type is parsed, but not executed at runtime. // Regression test for issue 16985. evalCount = 0; - if (e is Undefined && testEval(e)) Expect.fail("unreachable"); // //# 97: continued + if (e is Undefined && testEval(e)) Expect.fail("unreachable"); // /// 97: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -50,7 +50,7 @@ test96(e) { // with malformed type is parsed, but not executed at runtime. // Regression test for issue 16985. evalCount = 0; - if (e as Undefined && testEval(e)) Expect.fail("unreachable"); // //# 96: continued + if (e as Undefined && testEval(e)) Expect.fail("unreachable"); // /// 96: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -63,7 +63,7 @@ test95(e) { // runtime error is thrown. try { evalCount = 0; - if (testEval(e) is Undefined) Expect.fail("unreachable"); // //# 95: continued + if (testEval(e) is Undefined) Expect.fail("unreachable"); // /// 95: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -76,7 +76,7 @@ test94(e) { // runtime error is thrown. try { evalCount = 0; - if (testEval(e) as Undefined) Expect.fail("unreachable"); // //# 94: continued + if (testEval(e) as Undefined) Expect.fail("unreachable"); // /// 94: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -85,10 +85,10 @@ test94(e) { } main() { - test99("99 bottles"); //# 99: static type warning - test98("98 bottles"); //# 98: static type warning - test97("97 bottles"); //# 97: static type warning - test96("96 bottles"); //# 96: static type warning - test95("95 bottles"); //# 95: static type warning - test94("94 bottles"); //# 94: static type warning + test99("99 bottles"); /// 99: static type warning + test98("98 bottles"); /// 98: static type warning + test97("97 bottles"); /// 97: static type warning + test96("96 bottles"); /// 96: static type warning + test95("95 bottles"); /// 95: static type warning + test94("94 bottles"); /// 94: static type warning } diff --git a/tests/language/issue1363_test.dart b/tests/language/issue1363_test.dart index 7d85cd84be8..6c9073b7b90 100644 --- a/tests/language/issue1363_test.dart +++ b/tests/language/issue1363_test.dart @@ -23,7 +23,7 @@ class C { C contents = myCup.getContents(); // expect no warning or error bool hasThrown = false; try { - contents = libCup.getContents(); //# static type warning + contents = libCup.getContents(); /// static type warning } on TypeError catch (e) { hasThrown = true; } diff --git a/tests/language/issue15606_test.dart b/tests/language/issue15606_test.dart index ea963d7664c..d50b576b54a 100644 --- a/tests/language/issue15606_test.dart +++ b/tests/language/issue15606_test.dart @@ -9,13 +9,13 @@ var a = [new Object(), 42]; main() { while (false) { // Comply to inlining heuristics. // Use an unresolved prefix. - var foo = Unresolved.foo( //# 01: static type warning + var foo = Unresolved.foo( /// 01: static type warning // Make dart2js generate a call to setRuntimeTypeInfo. - new Foo(), //# 01: continued + new Foo(), /// 01: continued // Use a one-shot interceptor. - a[0].toString()); //# 01: continued + a[0].toString()); /// 01: continued // Do an is test on `Foo` to require setRuntimeTypeInfo. - print(foo is Foo); //# 01: continued + print(foo is Foo); /// 01: continued } } diff --git a/tests/language/issue18628_1_test.dart b/tests/language/issue18628_1_test.dart index 3856b3e7457..9481efde144 100644 --- a/tests/language/issue18628_1_test.dart +++ b/tests/language/issue18628_1_test.dart @@ -11,10 +11,10 @@ class C { // This line is supposed to cause the warning; the other commented // line just doesn't make sense without this line. - T t = int; //# 01: static type warning + T t = int; /// 01: static type warning } main() { C c = new C(); - print(c.t); //# 01: static type warning + print(c.t); /// 01: static type warning } diff --git a/tests/language/issue18628_2_test.dart b/tests/language/issue18628_2_test.dart index 3232ea0fbae..a6e1cfd73e4 100644 --- a/tests/language/issue18628_2_test.dart +++ b/tests/language/issue18628_2_test.dart @@ -12,9 +12,9 @@ class X {} // This line is supposed to cause the warning; the other lines are // marked because they don't make sense when [Y] is not defined. -class Y extends X {} //# 01: static type warning +class Y extends X {} /// 01: static type warning main() { - X x = new X(); //# 01: static type warning - Y y = new Y(); //# 01: static type warning + X x = new X(); /// 01: static type warning + Y y = new Y(); /// 01: static type warning } diff --git a/tests/language/issue_22780_test.dart b/tests/language/issue_22780_test.dart index 34dabd6ed5e..6e54dcfb0b8 100644 --- a/tests/language/issue_22780_test.dart +++ b/tests/language/issue_22780_test.dart @@ -3,5 +3,5 @@ // BSD-style license that can be found in the LICENSE file. main() { - f() => "Oh, the joy of ${f()}"; print(f()); //# 01: runtime error + f() => "Oh, the joy of ${f()}"; print(f()); /// 01: runtime error } diff --git a/tests/language/issue_25671a_test.dart b/tests/language/issue_25671a_test.dart index 00b0dd7a090..602466e281e 100644 --- a/tests/language/issue_25671a_test.dart +++ b/tests/language/issue_25671a_test.dart @@ -5,17 +5,17 @@ import 'package:expect/expect.dart'; class A { - noSuchMethod() { // //# 01: static type warning - throw new Exception( // //# 01: continued - "Wrong noSuchMethod() should not be called"); //# 01: continued - } // //# 01: continued + noSuchMethod() { // /// 01: static type warning + throw new Exception( // /// 01: continued + "Wrong noSuchMethod() should not be called"); /// 01: continued + } // /// 01: continued } class C extends A { test() { - super.v = 1; //# 01: continued + super.v = 1; /// 01: continued } } main() { C c = new C(); - Expect.throws(() => c.test(), (e) => e is NoSuchMethodError); //# 01: continued + Expect.throws(() => c.test(), (e) => e is NoSuchMethodError); /// 01: continued } diff --git a/tests/language/issue_25671b_test.dart b/tests/language/issue_25671b_test.dart index 4725681271c..e51b2ee158d 100644 --- a/tests/language/issue_25671b_test.dart +++ b/tests/language/issue_25671b_test.dart @@ -5,17 +5,17 @@ import 'package:expect/expect.dart'; class A { - noSuchMethod() { // //# 01: static type warning - throw new Exception( // //# 01: continued - "Wrong noSuchMethod() should not be called"); //# 01: continued - } // //# 01: continued + noSuchMethod() { // /// 01: static type warning + throw new Exception( // /// 01: continued + "Wrong noSuchMethod() should not be called"); /// 01: continued + } // /// 01: continued } class C extends Object with A { test() { - super.v = 1; //# 01: continued + super.v = 1; /// 01: continued } } main() { C c = new C(); - Expect.throws(() => c.test(), (e) => e is NoSuchMethodError); //# 01: continued + Expect.throws(() => c.test(), (e) => e is NoSuchMethodError); /// 01: continued } diff --git a/tests/language/keyword_type_expression_test.dart b/tests/language/keyword_type_expression_test.dart index e375c17d4b3..6edea2ced72 100644 --- a/tests/language/keyword_type_expression_test.dart +++ b/tests/language/keyword_type_expression_test.dart @@ -5,11 +5,11 @@ // Test that a keyword can't be used as type. Serves as regression test for // crashes in dart2js. -in greeting = "fisk"; // //# 01: compile-time error +in greeting = "fisk"; // /// 01: compile-time error main( -in greeting // //# 02: compile-time error +in greeting // /// 02: compile-time error ) { - in greeting = "fisk"; // //# 03: compile-time error - print(greeting); // //# 01: continued + in greeting = "fisk"; // /// 03: compile-time error + print(greeting); // /// 01: continued } diff --git a/tests/language/least_upper_bound_expansive_test.dart b/tests/language/least_upper_bound_expansive_test.dart index aaa50b9d336..704b2a384fa 100644 --- a/tests/language/least_upper_bound_expansive_test.dart +++ b/tests/language/least_upper_bound_expansive_test.dart @@ -40,17 +40,17 @@ void testC1(bool z, C1 a, N> b) { // Object is the most specific type in the intersection of the supertypes. // Is least upper bound dynamic? - (z ? a : b).z; //# 01: static type warning + (z ? a : b).z; /// 01: static type warning // Is least upper bound N<...> ? - (z ? a : b).n; //# 02: static type warning + (z ? a : b).n; /// 02: static type warning // Is least upper bound C1<...> ? - (z ? a : b).c1; //# 03: static type warning + (z ? a : b).c1; /// 03: static type warning // Is least upper bound N ? - (z ? a : b).n.z; //# 04: static type warning + (z ? a : b).n.z; /// 04: static type warning // Is least upper bound N> ? - (z ? a : b).n.n; //# 05: static type warning + (z ? a : b).n.n; /// 05: static type warning // Is least upper bound N> ? - (z ? a : b).n.c1; //# 06: static type warning + (z ? a : b).n.c1; /// 06: static type warning } } @@ -81,17 +81,17 @@ void testC2(bool z, C2 a, N> b) { // Object is the most specific type in the intersection of the supertypes. // Is least upper bound dynamic? - (z ? a : b).z; //# 07: static type warning + (z ? a : b).z; /// 07: static type warning // Is least upper bound N<...> ? - (z ? a : b).n; //# 08: static type warning + (z ? a : b).n; /// 08: static type warning // Is least upper bound C2<...> ? - (z ? a : b).c2; //# 09: static type warning + (z ? a : b).c2; /// 09: static type warning // Is least upper bound N ? - (z ? a : b).n.z; //# 10: static type warning + (z ? a : b).n.z; /// 10: static type warning // Is least upper bound N> ? - (z ? a : b).n.n; //# 11: static type warning + (z ? a : b).n.n; /// 11: static type warning // Is least upper bound N> ? - (z ? a : b).n.c2; //# 12: static type warning + (z ? a : b).n.c2; /// 12: static type warning } } diff --git a/tests/language/least_upper_bound_test.dart b/tests/language/least_upper_bound_test.dart index d75f35911f6..410671a8c74 100644 --- a/tests/language/least_upper_bound_test.dart +++ b/tests/language/least_upper_bound_test.dart @@ -37,34 +37,34 @@ void main() { } void testAB(A a, B b) { - A r1 = true ? a : b; //# 01: ok - B r2 = false ? a : b; //# 02: ok - (true ? a : b).a = 0; //# 03: static type warning - (false ? a : b).b = 0; //# 04: static type warning + A r1 = true ? a : b; /// 01: ok + B r2 = false ? a : b; /// 02: ok + (true ? a : b).a = 0; /// 03: static type warning + (false ? a : b).b = 0; /// 04: static type warning var c = new C(); - (true ? a : c).a = 0; //# 05: ok - (false ? c : b).b = 0; //# 06: ok + (true ? a : c).a = 0; /// 05: ok + (false ? c : b).b = 0; /// 06: ok } void testBC(B b, C c) { - B r1 = true ? b : c; //# 07: ok - C r2 = false ? b : c; //# 08: ok - (true ? b : c).b = 0; //# 09: ok - (false ? b : c).c = 0; //# 10: static type warning + B r1 = true ? b : c; /// 07: ok + C r2 = false ? b : c; /// 08: ok + (true ? b : c).b = 0; /// 09: ok + (false ? b : c).c = 0; /// 10: static type warning var a = null; - (true ? b : a).b = 0; //# 11: ok - (false ? a : b).c = 0; //# 12: ok - (true ? c : a).b = 0; //# 13: ok - (false ? a : c).c = 0; //# 14: ok + (true ? b : a).b = 0; /// 11: ok + (false ? a : b).c = 0; /// 12: ok + (true ? c : a).b = 0; /// 13: ok + (false ? a : c).c = 0; /// 14: ok } void testCD(C c, D d) { - C r1 = true ? c : d; //# 15: ok - D r2 = false ? c : d; //# 16: ok - (true ? c : d).b = 0; //# 17: ok - (false ? c : d).b = 0; //# 18: ok - (true ? c : d).c = 0; //# 19: static type warning - (false ? c : d).d = 0; //# 20: static type warning + C r1 = true ? c : d; /// 15: ok + D r2 = false ? c : d; /// 16: ok + (true ? c : d).b = 0; /// 17: ok + (false ? c : d).b = 0; /// 18: ok + (true ? c : d).c = 0; /// 19: static type warning + (false ? c : d).d = 0; /// 20: static type warning } void testEE(E e, E f) { @@ -72,16 +72,16 @@ void testEE(E e, E f) { // {E, Object} for E and // {E, Object} for E and // Object is the most specific type in the intersection of the supertypes. - E r1 = true ? e : f; //# 21: ok - F r2 = false ? e : f; //# 22: ok + E r1 = true ? e : f; /// 21: ok + F r2 = false ? e : f; /// 22: ok try { - A r3 = true ? e : f; //# 23: ok - B r4 = false ? e : f; //# 24: ok + A r3 = true ? e : f; /// 23: ok + B r4 = false ? e : f; /// 24: ok } catch (e) { // Type error in checked mode. } - (true ? e : f).e = null; //# 25: static type warning - (false ? e : f).e = null; //# 26: static type warning + (true ? e : f).e = null; /// 25: static type warning + (false ? e : f).e = null; /// 26: static type warning } void testEF(E e, F f) { @@ -89,15 +89,15 @@ void testEF(E e, F f) { // {E, Object} for E and // {F, E, Object} for F and // Object is the most specific type in the intersection of the supertypes. - E r1 = true ? e : f; //# 27: ok - F r2 = false ? e : f; //# 28: ok + E r1 = true ? e : f; /// 27: ok + F r2 = false ? e : f; /// 28: ok try { - A r3 = true ? e : f; //# 29: ok - B r4 = false ? e : f; //# 30: ok + A r3 = true ? e : f; /// 29: ok + B r4 = false ? e : f; /// 30: ok } catch (e) { // Type error in checked mode. } var r5; - r5 = (true ? e : f).e; //# 31: static type warning - r5 = (false ? e : f).f; //# 32: static type warning + r5 = (true ? e : f).e; /// 31: static type warning + r5 = (false ? e : f).f; /// 32: static type warning } \ No newline at end of file diff --git a/tests/language/library_ambiguous_test.dart b/tests/language/library_ambiguous_test.dart index ccac0087c07..aef63330484 100644 --- a/tests/language/library_ambiguous_test.dart +++ b/tests/language/library_ambiguous_test.dart @@ -9,15 +9,15 @@ import "library1.dart"; // Defines top level variable 'foo' import "library2.dart"; // Defines top level variable 'foo' class X -extends baw // //# 05: compile-time error +extends baw // /// 05: compile-time error {} main() { - print(foo); // //# 00: runtime error - print(bar()); // //# 01: runtime error - print(baz()); // //# 02: runtime error - print(bay()); // //# 03: runtime error - print(main is bax); // //# 04: static type warning, runtime error - var x = new X(); // //# 05: continued + print(foo); // /// 00: runtime error + print(bar()); // /// 01: runtime error + print(baz()); // /// 02: runtime error + print(bay()); // /// 03: runtime error + print(main is bax); // /// 04: static type warning, runtime error + var x = new X(); // /// 05: continued print("No error expected if ambiguous definitions are not used."); } diff --git a/tests/language/library_env_test.dart b/tests/language/library_env_test.dart index f159bebb836..01cc4be7db7 100644 --- a/tests/language/library_env_test.dart +++ b/tests/language/library_env_test.dart @@ -21,8 +21,8 @@ main() { bool hasHtmlSupport; - hasHtmlSupport = true; // //# has_html_support: ok - hasHtmlSupport = false; // //# has_no_html_support: ok + hasHtmlSupport = true; // /// has_html_support: ok + hasHtmlSupport = false; // /// has_no_html_support: ok if (hasHtmlSupport != null) { bool expectedResult = hasHtmlSupport ? true : NOT_PRESENT; @@ -48,8 +48,8 @@ main() { } bool hasIoSupport; - hasIoSupport = true; // //# has_io_support: ok - hasIoSupport = false; // //# has_no_io_support: ok + hasIoSupport = true; // /// has_io_support: ok + hasIoSupport = false; // /// has_no_io_support: ok if (hasIoSupport != null) { // Dartium overrides 'dart.library.io' to return "false". @@ -61,8 +61,8 @@ main() { } bool hasMirrorSupport; - hasMirrorSupport = true; // //# has_mirror_support: ok - hasMirrorSupport = false; // //# has_no_mirror_support: ok + hasMirrorSupport = true; // /// has_mirror_support: ok + hasMirrorSupport = false; // /// has_no_mirror_support: ok if (hasMirrorSupport != null) { bool expectedResult = hasMirrorSupport ? true : NOT_PRESENT; diff --git a/tests/language/list_literal1_test.dart b/tests/language/list_literal1_test.dart index 726177ab9fd..11192800721 100644 --- a/tests/language/list_literal1_test.dart +++ b/tests/language/list_literal1_test.dart @@ -6,6 +6,6 @@ main() { var m = const - // //# 01: static type warning, checked mode compile-time error + // /// 01: static type warning, checked mode compile-time error [0, 1]; } diff --git a/tests/language/list_literal_syntax_test.dart b/tests/language/list_literal_syntax_test.dart index c1a2060a00c..c9c33204189 100644 --- a/tests/language/list_literal_syntax_test.dart +++ b/tests/language/list_literal_syntax_test.dart @@ -9,41 +9,41 @@ abstract class I {} void main() { var list; list = [0]; Expect.equals(1, list.length); list = [0]; Expect.equals(1, list.length); list = [0]; Expect.equals(1, list.length); list = - <> //# 04: compile-time error + <> /// 04: compile-time error [0]; Expect.equals(1, list.length); list = - <<>> //# 05: compile-time error + <<>> /// 05: compile-time error [0]; Expect.equals(1, list.length); list = - <<<>>> //# 06: compile-time error + <<<>>> /// 06: compile-time error [0]; Expect.equals(1, list.length); list = - <[]> //# 07: compile-time error + <[]> /// 07: compile-time error [0]; Expect.equals(1, list.length); diff --git a/tests/language/literal_unary_plus_test.dart b/tests/language/literal_unary_plus_test.dart index 6c1932e5c1c..de484e6b42d 100644 --- a/tests/language/literal_unary_plus_test.dart +++ b/tests/language/literal_unary_plus_test.dart @@ -6,8 +6,8 @@ // Only a number literal can be preceded by a "+'". main() { - var a = + 1; // //# 01: compile-time error - var x = +"foo"; // //# 02: compile-time error - var x = + "foo"; // //# 03: compile-time error + var a = + 1; // /// 01: compile-time error + var x = +"foo"; // /// 02: compile-time error + var x = + "foo"; // /// 03: compile-time error } diff --git a/tests/language/main_not_a_function_test.dart b/tests/language/main_not_a_function_test.dart index bbdf765c19c..e2eec9643be 100644 --- a/tests/language/main_not_a_function_test.dart +++ b/tests/language/main_not_a_function_test.dart @@ -2,8 +2,8 @@ // 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. -/* //# 01: static type warning, runtime error +/* /// 01: static type warning, runtime error main() {} -*/ //# 01: continued +*/ /// 01: continued -var main; //# 01: continued +var main; /// 01: continued diff --git a/tests/language/main_test.dart b/tests/language/main_test.dart index db9324d874d..151636b4659 100644 --- a/tests/language/main_test.dart +++ b/tests/language/main_test.dart @@ -4,21 +4,21 @@ main( -a // //# 01: ok -a, b // //# 02: ok -a, b, c // //# 03: static type warning, runtime error -a, b, {c} //# 04: ok -a, b, [c] //# 05: ok +a // /// 01: ok +a, b // /// 02: ok +a, b, c // /// 03: static type warning, runtime error +a, b, {c} /// 04: ok +a, b, [c] /// 05: ok -[a] // //# 20: ok -a, [b] // //# 21: ok -[a, b] // //# 22: ok +[a] // /// 20: ok +a, [b] // /// 21: ok +[a, b] // /// 22: ok -{a} // //# 41: ok -a, {b} // //# 42: ok -{a, b} // //# 43: ok -[a, b, c] //# 44: ok -{a, b, c} //# 45: ok +{a} // /// 41: ok +a, {b} // /// 42: ok +{a, b} // /// 43: ok +[a, b, c] /// 44: ok +{a, b, c} /// 45: ok ) { } diff --git a/tests/language/malbounded_instantiation_test.dart b/tests/language/malbounded_instantiation_test.dart index 6e725ef9bbb..78ace6a2978 100644 --- a/tests/language/malbounded_instantiation_test.dart +++ b/tests/language/malbounded_instantiation_test.dart @@ -5,11 +5,11 @@ import 'package:expect/expect.dart'; class Super {} -class Malbounded1 implements Super {} // //# 01: static type warning -class Malbounded2 extends Super {} // //# 02: static type warning +class Malbounded1 implements Super {} // /// 01: static type warning +class Malbounded2 extends Super {} // /// 02: static type warning main() { - new Malbounded1(); // //# 01: static type warning - new Malbounded2(); // //# 02: static type warning, dynamic type error - new Super(); // //# 03: static type warning, dynamic type error + new Malbounded1(); // /// 01: static type warning + new Malbounded2(); // /// 02: static type warning, dynamic type error + new Super(); // /// 03: static type warning, dynamic type error } diff --git a/tests/language/malbounded_redirecting_factory2_test.dart b/tests/language/malbounded_redirecting_factory2_test.dart index afb19c634bf..f459974d045 100644 --- a/tests/language/malbounded_redirecting_factory2_test.dart +++ b/tests/language/malbounded_redirecting_factory2_test.dart @@ -5,17 +5,17 @@ import 'package:expect/expect.dart'; class A implements B, C { } class B { factory B() = A; } class C { factory C() = B; } @@ -26,8 +26,8 @@ class D { main() { new D().test(); - new D().test(); // //# 01: static type warning - new D().test(); // //# 02: static type warning, dynamic type error - new D().test(); // //# 03: static type warning, dynamic type error - new D().test(); // //# 04: static type warning, dynamic type error + new D().test(); // /// 01: static type warning + new D().test(); // /// 02: static type warning, dynamic type error + new D().test(); // /// 03: static type warning, dynamic type error + new D().test(); // /// 04: static type warning, dynamic type error } diff --git a/tests/language/malbounded_redirecting_factory_test.dart b/tests/language/malbounded_redirecting_factory_test.dart index 0ce6d0ac856..1c9b8de22f8 100644 --- a/tests/language/malbounded_redirecting_factory_test.dart +++ b/tests/language/malbounded_redirecting_factory_test.dart @@ -5,25 +5,25 @@ import 'package:expect/expect.dart'; class A implements B, C { } class B { factory B() = A; } class C { factory C() = B; } main() { new C(); - new C(); // //# 01: static type warning - new C(); // //# 02: static type warning, dynamic type error - new C(); // //# 03: static type warning, dynamic type error - new C(); // //# 04: static type warning, dynamic type error + new C(); // /// 01: static type warning + new C(); // /// 02: static type warning, dynamic type error + new C(); // /// 03: static type warning, dynamic type error + new C(); // /// 04: static type warning, dynamic type error } diff --git a/tests/language/malbounded_type_cast2_test.dart b/tests/language/malbounded_type_cast2_test.dart index 1fd8baa2cc2..7dc095a207c 100644 --- a/tests/language/malbounded_type_cast2_test.dart +++ b/tests/language/malbounded_type_cast2_test.dart @@ -18,7 +18,7 @@ class A { } class B { test() { - new A() as A; // //# static type warning + new A() as A; // /// static type warning } } diff --git a/tests/language/malbounded_type_cast_test.dart b/tests/language/malbounded_type_cast_test.dart index b3d55214f10..4bdcb665058 100644 --- a/tests/language/malbounded_type_cast_test.dart +++ b/tests/language/malbounded_type_cast_test.dart @@ -5,13 +5,13 @@ import 'package:expect/expect.dart'; class Super {} -class Malbounded1 implements Super {} // //# static type warning -class Malbounded2 extends Super {} // //# static type warning +class Malbounded1 implements Super {} // /// static type warning +class Malbounded2 extends Super {} // /// static type warning main() { bool inCheckedMode = false; try { - String a = 42; //# static type warning + String a = 42; /// static type warning } catch (e) { inCheckedMode = true; } @@ -28,5 +28,5 @@ main() { var s = new Super(); Expect.throws(() => s as Malbounded1, (e) => e is CastError); Expect.throws(() => s as Malbounded2, expectedError); - Expect.throws(() => s as Super, expectedError); //# static type warning + Expect.throws(() => s as Super, expectedError); /// static type warning } diff --git a/tests/language/malbounded_type_test2_test.dart b/tests/language/malbounded_type_test2_test.dart index 3dbb436f469..c8fa7ead478 100644 --- a/tests/language/malbounded_type_test2_test.dart +++ b/tests/language/malbounded_type_test2_test.dart @@ -18,7 +18,7 @@ class A { } class B { test() { - new A() is A; // //# static type warning + new A() is A; // /// static type warning } } diff --git a/tests/language/malbounded_type_test_test.dart b/tests/language/malbounded_type_test_test.dart index 261fcbb3d82..ef4bacff799 100644 --- a/tests/language/malbounded_type_test_test.dart +++ b/tests/language/malbounded_type_test_test.dart @@ -5,15 +5,15 @@ import 'package:expect/expect.dart'; class Super {} -class Malbounded1 implements Super {} // //# 01: static type warning, dynamic type error -class Malbounded1 implements Super {} // //# 02: static type warning -class Malbounded2 extends Super {} // //# 03: static type warning, dynamic type error +class Malbounded1 implements Super {} // /// 01: static type warning, dynamic type error +class Malbounded1 implements Super {} // /// 02: static type warning +class Malbounded2 extends Super {} // /// 03: static type warning, dynamic type error main() { - var m = new Malbounded1(); // //# 01: continued - Expect.isFalse(m is Super); // //# 01: continued + var m = new Malbounded1(); // /// 01: continued + Expect.isFalse(m is Super); // /// 01: continued var s = new Super(); - Expect.isFalse(s is Malbounded1); // //# 02: continued - Expect.isFalse(s is Malbounded2); // //# 03: continued - Expect.isFalse(s is Super); // //# 04: static type warning, dynamic type error + Expect.isFalse(s is Malbounded1); // /// 02: continued + Expect.isFalse(s is Malbounded2); // /// 03: continued + Expect.isFalse(s is Super); // /// 04: static type warning, dynamic type error } diff --git a/tests/language/malformed2_test.dart b/tests/language/malformed2_test.dart index 1b263fa13c1..84011c49712 100644 --- a/tests/language/malformed2_test.dart +++ b/tests/language/malformed2_test.dart @@ -5,7 +5,7 @@ library malformed_test; // This part includes the actual tests. -part 'malformed2_lib.dart'; //# 00: static type warning +part 'malformed2_lib.dart'; /// 00: static type warning bool inCheckedMode() { try { @@ -49,11 +49,11 @@ test(bool expectTypeError, f(), [String message]) { } } -const Unresolved c1 = 0; //# 01: static type warning, checked mode compile-time error +const Unresolved c1 = 0; /// 01: static type warning, checked mode compile-time error void main() { - print(c1); //# 01: continued - testValue(new List()); //# 00: continued - testValue(null); //# 00: continued + print(c1); /// 01: continued + testValue(new List()); /// 00: continued + testValue(null); /// 00: continued checkFailures(); } diff --git a/tests/language/malformed_bound_test.dart b/tests/language/malformed_bound_test.dart index c1845ffb0d7..061c3b9453c 100644 --- a/tests/language/malformed_bound_test.dart +++ b/tests/language/malformed_bound_test.dart @@ -5,13 +5,13 @@ // Test that a malformed type variable bound is treated as dynamic. class C { - f(T t) => t.foo; //# 01: continued + f(T t) => t.foo; /// 01: continued } main() { new C() - .f(1) //# 01: continued + .f(1) /// 01: continued ; } diff --git a/tests/language/malformed_inheritance_test.dart b/tests/language/malformed_inheritance_test.dart index f55d8807a37..71eb1963dc7 100644 --- a/tests/language/malformed_inheritance_test.dart +++ b/tests/language/malformed_inheritance_test.dart @@ -10,25 +10,25 @@ import 'package:expect/expect.dart'; class A {} class C - extends Unresolved //# 01: compile-time error - extends A //# 02: static type warning - extends Object with Unresolved //# 03: compile-time error - extends Object with A //# 04: static type warning - implements Unresolved //# 05: compile-time error - implements A //# 06: static type warning - extends A //# 07: compile-time error - extends A //# 08: compile-time error - extends Object with A //# 09: compile-time error - extends Object with A //# 10: compile-time error - implements A //# 11: compile-time error - implements A //# 12: compile-time error + extends Unresolved /// 01: compile-time error + extends A /// 02: static type warning + extends Object with Unresolved /// 03: compile-time error + extends Object with A /// 04: static type warning + implements Unresolved /// 05: compile-time error + implements A /// 06: static type warning + extends A /// 07: compile-time error + extends A /// 08: compile-time error + extends Object with A /// 09: compile-time error + extends Object with A /// 10: compile-time error + implements A /// 11: compile-time error + implements A /// 12: compile-time error { } void main() { new C(); - Expect.isTrue(new C() is A && new C() is A); //# 02: continued - Expect.isTrue(new C() is A && new C() is A); //# 04: continued - Expect.isTrue(new C() is A && new C() is A); //# 06: continued + Expect.isTrue(new C() is A && new C() is A); /// 02: continued + Expect.isTrue(new C() is A && new C() is A); /// 04: continued + Expect.isTrue(new C() is A && new C() is A); /// 06: continued } \ No newline at end of file diff --git a/tests/language/malformed_test.dart b/tests/language/malformed_test.dart index 23ba383ef58..ca438686f14 100644 --- a/tests/language/malformed_test.dart +++ b/tests/language/malformed_test.dart @@ -76,7 +76,7 @@ void main() { checkAsListUnresolved(true, new List()); checkIsListDynamic(true, []); - checkIsListDynamic(true, <>[]); //# 01: compile-time error + checkIsListDynamic(true, <>[]); /// 01: compile-time error checkIsListDynamic(false, []); checkIsListDynamic(true, []); checkIsListDynamic(true, >[]); @@ -85,7 +85,7 @@ void main() { checkIsListDynamic(true, []); checkIsListDynamic(true, new List()); - checkIsListDynamic(true, new List<>()); //# 02: compile-time error + checkIsListDynamic(true, new List<>()); /// 02: compile-time error checkIsListDynamic(true, new List()); checkIsListDynamic(true, new List>()); checkIsListDynamic(true, new List()); @@ -94,7 +94,7 @@ void main() { checkIsMapDynamic(true, true, {}); checkIsMapDynamic(true, true, {}); - checkIsMapDynamic(true, true, <>{}); //# 03: compile-time error + checkIsMapDynamic(true, true, <>{}); /// 03: compile-time error checkIsMapDynamic(true, true, {}); checkIsMapDynamic(false, false, {}); checkIsMapDynamic(true, true, {}); @@ -104,7 +104,7 @@ void main() { checkIsMapDynamic(false, true, >{}); checkIsMapDynamic(true, true, new Map()); - checkIsMapDynamic(true, true, new Map<>); //# 04: compile-time error + checkIsMapDynamic(true, true, new Map<>); /// 04: compile-time error checkIsMapDynamic(true, true, new Map()); checkIsMapDynamic(false, false, new Map()); checkIsMapDynamic(true, true, new Map()); @@ -163,7 +163,7 @@ void main() { try { throw 'foo'; } - on undeclared_prefix.Unresolved // //# 06: runtime error + on undeclared_prefix.Unresolved // /// 06: runtime error catch (e) { } } \ No newline at end of file diff --git a/tests/language/map_literal1_test.dart b/tests/language/map_literal1_test.dart index 6e336f4916d..0305190321e 100644 --- a/tests/language/map_literal1_test.dart +++ b/tests/language/map_literal1_test.dart @@ -6,7 +6,7 @@ main() { var m = const - // //# 01: static type warning, checked mode compile-time error + // /// 01: static type warning, checked mode compile-time error {"a": 0}; } diff --git a/tests/language/map_literal3_test.dart b/tests/language/map_literal3_test.dart index f2f02a25860..3a11f76789c 100644 --- a/tests/language/map_literal3_test.dart +++ b/tests/language/map_literal3_test.dart @@ -63,17 +63,17 @@ class MapLiteralTest { Expect.equals(14, m.length); // Check that last value of duplicate key wins for const maps. - final cmap = const {"a": 10, "b": 100, "a": 1000}; //# static type warning + final cmap = const {"a": 10, "b": 100, "a": 1000}; /// static type warning Expect.equals(2, cmap.length); Expect.equals(1000, cmap["a"]); Expect.equals(100, cmap["b"]); - final cmap2 = const {"a": 10, "a": 100, "a": 1000}; //# static type warning + final cmap2 = const {"a": 10, "a": 100, "a": 1000}; /// static type warning Expect.equals(1, cmap2.length); Expect.equals(1000, cmap["a"]); // Check that last value of duplicate key wins for mutable maps. - var mmap = {"a": 10, "b": 100, "a": 1000}; //# static type warning + var mmap = {"a": 10, "b": 100, "a": 1000}; /// static type warning Expect.equals(2, mmap.length); Expect.equals(1000, mmap["a"]); @@ -83,7 +83,7 @@ class MapLiteralTest { // are still evaluated, including side effects. int counter = 0; int ctr() { counter += 10; return counter; } - mmap = {"a": ctr(), "b": ctr(), "a": ctr()}; //# static type warning + mmap = {"a": ctr(), "b": ctr(), "a": ctr()}; /// static type warning Expect.equals(2, mmap.length); Expect.equals(40, ctr()); Expect.equals(30, mmap["a"]); diff --git a/tests/language/metadata_scope1_test.dart b/tests/language/metadata_scope1_test.dart index 2acdf7f7bb8..7d23dcfe8ee 100644 --- a/tests/language/metadata_scope1_test.dart +++ b/tests/language/metadata_scope1_test.dart @@ -7,7 +7,7 @@ @deprecated typedef Foo - // //# 01: ok + // /// 01: ok (); main() { diff --git a/tests/language/metadata_scope2_test.dart b/tests/language/metadata_scope2_test.dart index 9b1ded66f9f..26c76737698 100644 --- a/tests/language/metadata_scope2_test.dart +++ b/tests/language/metadata_scope2_test.dart @@ -7,7 +7,7 @@ @deprecated class Foo - // //# 01: ok + // /// 01: ok {} main() { diff --git a/tests/language/method_override2_test.dart b/tests/language/method_override2_test.dart index f697efe7b8c..63eb4310dd8 100644 --- a/tests/language/method_override2_test.dart +++ b/tests/language/method_override2_test.dart @@ -11,7 +11,7 @@ abstract class I { abstract class J extends I { } abstract class K extends J { - m({c, d}); // //# 00: static type warning + m({c, d}); // /// 00: static type warning } class C implements I { @@ -21,9 +21,9 @@ class C implements I { } class D - extends C // //# 01: static type warning - implements I // //# 02: static type warning - implements J // //# 03: static type warning + extends C // /// 01: static type warning + implements I // /// 02: static type warning + implements J // /// 03: static type warning { m({c, d}) { print("$c $d"); diff --git a/tests/language/method_override3_test.dart b/tests/language/method_override3_test.dart index f4734810f65..9dfee735732 100644 --- a/tests/language/method_override3_test.dart +++ b/tests/language/method_override3_test.dart @@ -13,26 +13,26 @@ class A { class B extends A { foo(required1 - /* // //# 00: static type warning + /* // /// 00: static type warning , { named1: 499 } - */ // //# 00: static type warning + */ // /// 00: static type warning ) { return required1; } bar(required1, required2, { named1: 13 - /* // //# 01: static type warning + /* // /// 01: static type warning , named2: 17 - */ // //# 01: static type warning + */ // /// 01: static type warning }) { return required1 + required2 * 3 + named1 * 5; } gee({named2: 11 - /* // //# 02: static type warning + /* // /// 02: static type warning , named1: 31 - */ // //# 02: static type warning + */ // /// 02: static type warning }) { return named2 * 99; } diff --git a/tests/language/method_override7_test.dart b/tests/language/method_override7_test.dart index 78009e99287..18f8fc3ee68 100644 --- a/tests/language/method_override7_test.dart +++ b/tests/language/method_override7_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: static type warning + var foo = 42; // /// 00: compile-time error + get foo => 42; // /// 01: compile-time error + foo() => 42; // /// 02: compile-time error + set foo(value) { } // /// 03: static type warning } class B extends A { diff --git a/tests/language/method_override8_test.dart b/tests/language/method_override8_test.dart index f58c26694a2..53e6576d031 100644 --- a/tests/language/method_override8_test.dart +++ b/tests/language/method_override8_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: ok - set foo(value) { } // //# 03: static type warning + var foo = 42; // /// 00: compile-time error + get foo => 42; // /// 01: compile-time error + foo() => 42; // /// 02: ok + set foo(value) { } // /// 03: static type warning } class B extends A { diff --git a/tests/language/missing_const_constructor_test.dart b/tests/language/missing_const_constructor_test.dart index 166c529099e..14b18d7b668 100644 --- a/tests/language/missing_const_constructor_test.dart +++ b/tests/language/missing_const_constructor_test.dart @@ -9,21 +9,21 @@ class GoodClass { } GoodClass GOOD_CLASS - = const GoodClass() //# 01: ok - = const GoodClass.BAD_NAME() //# 02: compile-time error - = const GoodClass("bad arg") //# 03: compile-time error + = const GoodClass() /// 01: ok + = const GoodClass.BAD_NAME() /// 02: compile-time error + = const GoodClass("bad arg") /// 03: compile-time error ; -const BadClass BAD_CLASS = const BadClass(); //# 04: compile-time error -BadClass BAD_CLASS = const BadClass(); //# 05: compile-time error +const BadClass BAD_CLASS = const BadClass(); /// 04: compile-time error +BadClass BAD_CLASS = const BadClass(); /// 05: compile-time error void main() { try { print(GOOD_CLASS); - print(BAD_CLASS); //# 04: continued - print(BAD_CLASS); //# 05: continued - print(const BadClass()); //# 06: compile-time error + print(BAD_CLASS); /// 04: continued + print(BAD_CLASS); /// 05: continued + print(const BadClass()); /// 06: compile-time error } catch (e) { } diff --git a/tests/language/missing_part_of_tag_test.dart b/tests/language/missing_part_of_tag_test.dart index 71589f1c0ab..ffb360cd148 100644 --- a/tests/language/missing_part_of_tag_test.dart +++ b/tests/language/missing_part_of_tag_test.dart @@ -6,6 +6,6 @@ library lib; -part 'missing_part_of_tag_part.dart'; //# 01: compile-time error +part 'missing_part_of_tag_part.dart'; /// 01: compile-time error void main() {} \ No newline at end of file diff --git a/tests/language/mixin_black_listed_test.dart b/tests/language/mixin_black_listed_test.dart index fc8eefec7be..c8a7c4894f3 100644 --- a/tests/language/mixin_black_listed_test.dart +++ b/tests/language/mixin_black_listed_test.dart @@ -10,33 +10,33 @@ class C {} class D {} class C1 extends Object -with String //# 01: compile-time error +with String /// 01: compile-time error {} class D1 extends Object with C -, Null //# 02: compile-time error +, Null /// 02: compile-time error {} class E1 extends Object with -int, //# 03: compile-time error +int, /// 03: compile-time error C {} class F1 extends Object with C -, double //# 04: compile-time error +, double /// 04: compile-time error , D {} -class C2 = Object with num; //# 05: compile-time error +class C2 = Object with num; /// 05: compile-time error class D2 = Object with C -, bool //# 06: compile-time error +, bool /// 06: compile-time error ; class E2 = Object with -String, //# 07: compile-time error +String, /// 07: compile-time error C; class F2 = Object with C, -dynamic, //# 08: compile-time error +dynamic, /// 08: compile-time error D; @@ -45,7 +45,7 @@ main() { Expect.isNotNull(new D1()); Expect.isNotNull(new E1()); Expect.isNotNull(new F1()); - Expect.isNotNull(new C2()); //# 05: continued + Expect.isNotNull(new C2()); /// 05: continued Expect.isNotNull(new D2()); Expect.isNotNull(new E2()); Expect.isNotNull(new F2()); diff --git a/tests/language/mixin_cyclic_test.dart b/tests/language/mixin_cyclic_test.dart index ba23aab4456..355a90300eb 100644 --- a/tests/language/mixin_cyclic_test.dart +++ b/tests/language/mixin_cyclic_test.dart @@ -10,13 +10,13 @@ class S {} class M {} class C1 = S with M; -class C2 = S with C2; //# 01: compile-time error +class C2 = S with C2; /// 01: compile-time error class C3 = S with M implements A; -class C4 = S with M implements C4; //# 02: compile-time error +class C4 = S with M implements C4; /// 02: compile-time error void main() { new C1(); - new C2(); //# 01: continued + new C2(); /// 01: continued new C3(); - new C4(); //# 02: continued + new C4(); /// 02: continued } diff --git a/tests/language/mixin_forwarding_constructor4_test.dart b/tests/language/mixin_forwarding_constructor4_test.dart index a1e5b2e1a77..6bf23ae4fa7 100644 --- a/tests/language/mixin_forwarding_constructor4_test.dart +++ b/tests/language/mixin_forwarding_constructor4_test.dart @@ -10,15 +10,15 @@ abstract class Mixin {} class Base { Base( - {x} // //# 01: compile-time error - {x} // //# 02: compile-time error - {x} // //# 03: compile-time error + {x} // /// 01: compile-time error + {x} // /// 02: compile-time error + {x} // /// 03: compile-time error ); } class C extends Base with Mixin { - C(); // //# 02: continued - C() : super(); //# 03: continued + C(); // /// 02: continued + C() : super(); /// 03: continued } main() { diff --git a/tests/language/mixin_illegal_constructor_test.dart b/tests/language/mixin_illegal_constructor_test.dart index d008f0810e9..7f54fa81fd2 100644 --- a/tests/language/mixin_illegal_constructor_test.dart +++ b/tests/language/mixin_illegal_constructor_test.dart @@ -16,40 +16,40 @@ class M2 { } class C0 = Object with M0; -class C1 = Object with M1; // //# 01: compile-time error -class C2 = Object with M2; // //# 02: compile-time error -class C3 = Object with M0, M1; // //# 03: compile-time error -class C4 = Object with M1, M0; // //# 04: compile-time error -class C5 = Object with M0, M2; // //# 05: compile-time error -class C6 = Object with M2, M0; // //# 06: compile-time error +class C1 = Object with M1; // /// 01: compile-time error +class C2 = Object with M2; // /// 02: compile-time error +class C3 = Object with M0, M1; // /// 03: compile-time error +class C4 = Object with M1, M0; // /// 04: compile-time error +class C5 = Object with M0, M2; // /// 05: compile-time error +class C6 = Object with M2, M0; // /// 06: compile-time error class D0 extends Object with M0 { } -class D1 extends Object with M1 { } // //# 07: compile-time error -class D2 extends Object with M2 { } // //# 08: compile-time error -class D3 extends Object with M0, M1 { } // //# 09: compile-time error -class D4 extends Object with M1, M0 { } // //# 10: compile-time error -class D5 extends Object with M0, M2 { } // //# 11: compile-time error -class D6 extends Object with M2, M0 { } // //# 12: compile-time error +class D1 extends Object with M1 { } // /// 07: compile-time error +class D2 extends Object with M2 { } // /// 08: compile-time error +class D3 extends Object with M0, M1 { } // /// 09: compile-time error +class D4 extends Object with M1, M0 { } // /// 10: compile-time error +class D5 extends Object with M0, M2 { } // /// 11: compile-time error +class D6 extends Object with M2, M0 { } // /// 12: compile-time error main() { new C0(); - new C1(); // //# 01: continued - new C2(); // //# 02: continued - new C3(); // //# 03: continued - new C4(); // //# 04: continued - new C5(); // //# 05: continued - new C6(); // //# 06: continued + new C1(); // /// 01: continued + new C2(); // /// 02: continued + new C3(); // /// 03: continued + new C4(); // /// 04: continued + new C5(); // /// 05: continued + new C6(); // /// 06: continued new D0(); - new D1(); // //# 07: continued - new D2(); // //# 08: continued - new D3(); // //# 09: continued - new D4(); // //# 10: continued - new D5(); // //# 11: continued - new D6(); // //# 12: continued + new D1(); // /// 07: continued + new D2(); // /// 08: continued + new D3(); // /// 09: continued + new D4(); // /// 10: continued + new D5(); // /// 11: continued + new D6(); // /// 12: continued - new C0(1,2,3); // //# 13: static type warning, runtime error - new C0.named(); // //# 14: static type warning, runtime error - new D0(1,2,3); // //# 15: static type warning, runtime error - new D0.named(); // //# 16: static type warning, runtime error + new C0(1,2,3); // /// 13: static type warning, runtime error + new C0.named(); // /// 14: static type warning, runtime error + new D0(1,2,3); // /// 15: static type warning, runtime error + new D0.named(); // /// 16: static type warning, runtime error } diff --git a/tests/language/mixin_illegal_cycles_test.dart b/tests/language/mixin_illegal_cycles_test.dart index 084aab25049..20358bbd1af 100644 --- a/tests/language/mixin_illegal_cycles_test.dart +++ b/tests/language/mixin_illegal_cycles_test.dart @@ -3,37 +3,37 @@ // BSD-style license that can be found in the LICENSE file. class M { } -class M0 extends Object with M0 { } // //# 01: compile-time error -class M1 = Object with M1; // //# 02: compile-time error +class M0 extends Object with M0 { } // /// 01: compile-time error +class M1 = Object with M1; // /// 02: compile-time error -class M2 = Object with M3; // //# 03: compile-time error -class M3 = Object with M2; // //# 03: continued +class M2 = Object with M3; // /// 03: compile-time error +class M3 = Object with M2; // /// 03: continued -class M4 = Object with M5; // //# 04: compile-time error -class M5 = Object with M6; // //# 04: continued -class M6 = Object with M4; // //# 04: continued +class M4 = Object with M5; // /// 04: compile-time error +class M5 = Object with M6; // /// 04: continued +class M6 = Object with M4; // /// 04: continued -class M7 extends Object with M8 { } // //# 05: compile-time error -class M8 extends Object with M7 { } // //# 05: continued +class M7 extends Object with M8 { } // /// 05: compile-time error +class M8 extends Object with M7 { } // /// 05: continued -class M9 = Object with M91; // //# 06: compile-time error -class M91 = Object with M92; // //# 06: continued -class M92 = Object with M91; // //# 06: continued +class M9 = Object with M91; // /// 06: compile-time error +class M91 = Object with M92; // /// 06: continued +class M92 = Object with M91; // /// 06: continued main() { - new M0(); // //# 01: continued + new M0(); // /// 01: continued - new M1(); // //# 02: continued + new M1(); // /// 02: continued - new M2(); // //# 03: continued - new M3(); // //# 03: continued + new M2(); // /// 03: continued + new M3(); // /// 03: continued - new M4(); // //# 04: continued - new M5(); // //# 04: continued - new M6(); // //# 04: continued + new M4(); // /// 04: continued + new M5(); // /// 04: continued + new M6(); // /// 04: continued - new M7(); // //# 05: continued - new M8(); // //# 05: continued + new M7(); // /// 05: continued + new M8(); // /// 05: continued - new M9(); // //# 06: continued + new M9(); // /// 06: continued } diff --git a/tests/language/mixin_illegal_object_test.dart b/tests/language/mixin_illegal_object_test.dart index a95bdfa0f42..fb2c0bd7c1b 100644 --- a/tests/language/mixin_illegal_object_test.dart +++ b/tests/language/mixin_illegal_object_test.dart @@ -7,12 +7,12 @@ class S { } class C0 extends S -with Object // //# 01: compile-time error +with Object // /// 01: compile-time error { } -class C1 = S with Object; // //# 02: compile-time error +class C1 = S with Object; // /// 02: compile-time error main() { new C0(); - new C1(); // //# 02: continued + new C1(); // /// 02: continued } diff --git a/tests/language/mixin_illegal_super_use_test.dart b/tests/language/mixin_illegal_super_use_test.dart index e633ad1e2b4..fb5d70d29a5 100644 --- a/tests/language/mixin_illegal_super_use_test.dart +++ b/tests/language/mixin_illegal_super_use_test.dart @@ -9,21 +9,21 @@ class M { class P0 { foo() { - super.toString(); // //# 01: compile-time error - super.foo(); // //# 02: compile-time error - super.bar = 100; // //# 03: compile-time error + super.toString(); // /// 01: compile-time error + super.foo(); // /// 02: compile-time error + super.bar = 100; // /// 03: compile-time error void inner() { - super.toString(); // //# 04: compile-time error - super.foo(); // //# 05: compile-time error - super.bar = 100; // //# 06: compile-time error + super.toString(); // /// 04: compile-time error + super.foo(); // /// 05: compile-time error + super.bar = 100; // /// 06: compile-time error } inner(); (() { - super.toString(); // //# 07: compile-time error - super.foo(); // //# 08: compile-time error - super.bar = 100; // //# 09: compile-time error + super.toString(); // /// 07: compile-time error + super.foo(); // /// 08: compile-time error + super.bar = 100; // /// 09: compile-time error })(); return 42; @@ -32,7 +32,7 @@ class P0 { class P1 { bar() { - super.toString(); // //# 10: compile-time error + super.toString(); // /// 10: compile-time error return 87; } @@ -52,7 +52,7 @@ class P1 { class P2 { baz() { - super.toString(); // //# 11: compile-time error + super.toString(); // /// 11: compile-time error return 99; } } diff --git a/tests/language/mixin_illegal_superclass_test.dart b/tests/language/mixin_illegal_superclass_test.dart index aac9c0bc19f..8424512a41e 100644 --- a/tests/language/mixin_illegal_superclass_test.dart +++ b/tests/language/mixin_illegal_superclass_test.dart @@ -12,110 +12,110 @@ class M2 extends M0 { } class C00 = S0 with M0; class C01 = S0 with M1; -class C02 = S0 with M2; // //# 01: compile-time error +class C02 = S0 with M2; // /// 01: compile-time error class C03 = S0 with M0, M1; -class C04 = S0 with M0, M2; // //# 02: compile-time error -class C05 = S0 with M2, M0; // //# 03: compile-time error -class C06 = S0 with M1, M2; // //# 04: compile-time error -class C07 = S0 with M2, M1; // //# 05: compile-time error +class C04 = S0 with M0, M2; // /// 02: compile-time error +class C05 = S0 with M2, M0; // /// 03: compile-time error +class C06 = S0 with M1, M2; // /// 04: compile-time error +class C07 = S0 with M2, M1; // /// 05: compile-time error class C10 = S1 with M0; class C11 = S1 with M1; -class C12 = S1 with M2; // //# 06: compile-time error +class C12 = S1 with M2; // /// 06: compile-time error class C13 = S1 with M0, M1; -class C14 = S1 with M0, M2; // //# 07: compile-time error -class C15 = S1 with M2, M0; // //# 08: compile-time error -class C16 = S1 with M1, M2; // //# 09: compile-time error -class C17 = S1 with M2, M1; // //# 10: compile-time error +class C14 = S1 with M0, M2; // /// 07: compile-time error +class C15 = S1 with M2, M0; // /// 08: compile-time error +class C16 = S1 with M1, M2; // /// 09: compile-time error +class C17 = S1 with M2, M1; // /// 10: compile-time error class C20 = S2 with M0; class C21 = S2 with M1; -class C22 = S2 with M2; // //# 11: compile-time error +class C22 = S2 with M2; // /// 11: compile-time error class C23 = S2 with M0, M1; -class C24 = S2 with M0, M2; // //# 12: compile-time error -class C25 = S2 with M2, M0; // //# 13: compile-time error -class C26 = S2 with M1, M2; // //# 14: compile-time error -class C27 = S2 with M2, M1; // //# 15: compile-time error +class C24 = S2 with M0, M2; // /// 12: compile-time error +class C25 = S2 with M2, M0; // /// 13: compile-time error +class C26 = S2 with M1, M2; // /// 14: compile-time error +class C27 = S2 with M2, M1; // /// 15: compile-time error class D00 extends S0 with M0 { } class D01 extends S0 with M1 { } -class D02 extends S0 with M2 { } // //# 16: compile-time error +class D02 extends S0 with M2 { } // /// 16: compile-time error class D03 extends S0 with M0, M1 { } -class D04 extends S0 with M0, M2 { } // //# 17: compile-time error -class D05 extends S0 with M2, M0 { } // //# 18: compile-time error -class D06 extends S0 with M1, M2 { } // //# 19: compile-time error -class D07 extends S0 with M2, M1 { } // //# 20: compile-time error +class D04 extends S0 with M0, M2 { } // /// 17: compile-time error +class D05 extends S0 with M2, M0 { } // /// 18: compile-time error +class D06 extends S0 with M1, M2 { } // /// 19: compile-time error +class D07 extends S0 with M2, M1 { } // /// 20: compile-time error class D10 extends S1 with M0 { } class D11 extends S1 with M1 { } -class D12 extends S1 with M2 { } // //# 21: compile-time error +class D12 extends S1 with M2 { } // /// 21: compile-time error class D13 extends S1 with M0, M1 { } -class D14 extends S1 with M0, M2 { } // //# 22: compile-time error -class D15 extends S1 with M2, M0 { } // //# 23: compile-time error -class D16 extends S1 with M1, M2 { } // //# 24: compile-time error -class D17 extends S1 with M2, M1 { } // //# 25: compile-time error +class D14 extends S1 with M0, M2 { } // /// 22: compile-time error +class D15 extends S1 with M2, M0 { } // /// 23: compile-time error +class D16 extends S1 with M1, M2 { } // /// 24: compile-time error +class D17 extends S1 with M2, M1 { } // /// 25: compile-time error class D20 extends S2 with M0 { } class D21 extends S2 with M1 { } -class D22 extends S2 with M2 { } // //# 26: compile-time error +class D22 extends S2 with M2 { } // /// 26: compile-time error class D23 extends S2 with M0, M1 { } -class D24 extends S2 with M0, M2 { } // //# 27: compile-time error -class D25 extends S2 with M2, M0 { } // //# 28: compile-time error -class D26 extends S2 with M1, M2 { } // //# 29: compile-time error -class D27 extends S2 with M2, M1 { } // //# 30: compile-time error +class D24 extends S2 with M0, M2 { } // /// 27: compile-time error +class D25 extends S2 with M2, M0 { } // /// 28: compile-time error +class D26 extends S2 with M1, M2 { } // /// 29: compile-time error +class D27 extends S2 with M2, M1 { } // /// 30: compile-time error main() { new C00(); new C01(); - new C02(); // //# 01: continued + new C02(); // /// 01: continued new C03(); - new C04(); // //# 02: continued - new C05(); // //# 03: continued - new C06(); // //# 04: continued - new C07(); // //# 05: continued + new C04(); // /// 02: continued + new C05(); // /// 03: continued + new C06(); // /// 04: continued + new C07(); // /// 05: continued new C10(); new C11(); - new C12(); // //# 06: continued + new C12(); // /// 06: continued new C13(); - new C14(); // //# 07: continued - new C15(); // //# 08: continued - new C16(); // //# 09: continued - new C17(); // //# 10: continued + new C14(); // /// 07: continued + new C15(); // /// 08: continued + new C16(); // /// 09: continued + new C17(); // /// 10: continued new C20(); new C21(); - new C22(); // //# 11: continued + new C22(); // /// 11: continued new C23(); - new C24(); // //# 12: continued - new C25(); // //# 13: continued - new C26(); // //# 14: continued - new C27(); // //# 15: continued + new C24(); // /// 12: continued + new C25(); // /// 13: continued + new C26(); // /// 14: continued + new C27(); // /// 15: continued new D00(); new D01(); - new D02(); // //# 16: continued + new D02(); // /// 16: continued new D03(); - new D04(); // //# 17: continued - new D05(); // //# 18: continued - new D06(); // //# 19: continued - new D07(); // //# 20: continued + new D04(); // /// 17: continued + new D05(); // /// 18: continued + new D06(); // /// 19: continued + new D07(); // /// 20: continued new D10(); new D11(); - new D12(); // //# 21: continued + new D12(); // /// 21: continued new D13(); - new D14(); // //# 22: continued - new D15(); // //# 23: continued - new D16(); // //# 24: continued - new D17(); // //# 25: continued + new D14(); // /// 22: continued + new D15(); // /// 23: continued + new D16(); // /// 24: continued + new D17(); // /// 25: continued new D20(); new D21(); - new D22(); // //# 26: continued + new D22(); // /// 26: continued new D23(); - new D24(); // //# 27: continued - new D25(); // //# 28: continued - new D26(); // //# 29: continued - new D27(); // //# 30: continued + new D24(); // /// 27: continued + new D25(); // /// 28: continued + new D26(); // /// 29: continued + new D27(); // /// 30: continued } diff --git a/tests/language/mixin_illegal_syntax_test.dart b/tests/language/mixin_illegal_syntax_test.dart index 8e9d5699d84..6466c1b389c 100644 --- a/tests/language/mixin_illegal_syntax_test.dart +++ b/tests/language/mixin_illegal_syntax_test.dart @@ -7,54 +7,54 @@ class G { } class M { } class T = S with M; -typedef T0 = S with M; // //# 00: compile-time error +typedef T0 = S with M; // /// 00: compile-time error abstract class TA = S with M; -class T1 = final S with M; // //# 01: compile-time error -class T2 = var S with M; // //# 02: compile-time error -class T3 = const S with M; // //# 03: compile-time error -class T4 = static S with M; // //# 04: compile-time error -class T5 = external S with M; // //# 05: compile-time error +class T1 = final S with M; // /// 01: compile-time error +class T2 = var S with M; // /// 02: compile-time error +class T3 = const S with M; // /// 03: compile-time error +class T4 = static S with M; // /// 04: compile-time error +class T5 = external S with M; // /// 05: compile-time error class T6 = G with M; class T7 = G> with M; -class C0 extends abstract S with M { } // //# 06: compile-time error -class C1 extends final S with M { } // //# 07: compile-time error -class C2 extends var S with M { } // //# 08: compile-time error -class C3 extends const S with M { } // //# 09: compile-time error -class C4 extends static S with M { } // //# 10: compile-time error -class C5 extends external S with M { } // //# 11: compile-time error +class C0 extends abstract S with M { } // /// 06: compile-time error +class C1 extends final S with M { } // /// 07: compile-time error +class C2 extends var S with M { } // /// 08: compile-time error +class C3 extends const S with M { } // /// 09: compile-time error +class C4 extends static S with M { } // /// 10: compile-time error +class C5 extends external S with M { } // /// 11: compile-time error class C6 extends G with M { } class C7 extends G> with M { } class D0 extends S with M - implements M // //# 12: compile-time error + implements M // /// 12: compile-time error implements M { } class D1 extends T { } -class X = S; // //# 14: compile-time error +class X = S; // /// 14: compile-time error main() { new T(); - new TA(); // //# 13: static type warning, runtime error - new T1(); // //# 01: continued - new T2(); // //# 02: continued - new T3(); // //# 03: continued - new T4(); // //# 04: continued - new T5(); // //# 05: continued + new TA(); // /// 13: static type warning, runtime error + new T1(); // /// 01: continued + new T2(); // /// 02: continued + new T3(); // /// 03: continued + new T4(); // /// 04: continued + new T5(); // /// 05: continued new T6(); new T7(); - new C0(); // //# 06: continued - new C1(); // //# 07: continued - new C2(); // //# 08: continued - new C3(); // //# 09: continued - new C4(); // //# 10: continued - new C5(); // //# 11: continued + new C0(); // /// 06: continued + new C1(); // /// 07: continued + new C2(); // /// 08: continued + new C3(); // /// 09: continued + new C4(); // /// 10: continued + new C5(); // /// 11: continued new C6(); new C7(); - new D0(); // //# 12: continued + new D0(); // /// 12: continued new D1(); - new X(); // //# 14: continued + new X(); // /// 14: continued } diff --git a/tests/language/mixin_invalid_bound2_test.dart b/tests/language/mixin_invalid_bound2_test.dart index d1dcbcaec7a..7e633c66a4f 100644 --- a/tests/language/mixin_invalid_bound2_test.dart +++ b/tests/language/mixin_invalid_bound2_test.dart @@ -22,19 +22,19 @@ class D extends S with M { } class E extends S with M { } main() { - new A(); // //# 01: static type warning - new A(); // //# 02: static type warning, dynamic type error - new A(); // //# 03: static type warning, dynamic type error - new B(); // //# 04: static type warning - new B(); // //# 05: static type warning, dynamic type error - new B(); // //# 06: static type warning, dynamic type error - new C(); // //# 07: static type warning - new C(); // //# 08: static type warning, dynamic type error - new C(); // //# 09: static type warning, dynamic type error - new D(); // //# 10: static type warning, dynamic type error - new D(); // //# 11: static type warning, dynamic type error - new D(); // //# 12: static type warning, dynamic type error - new E(); // //# 12: static type warning, dynamic type error - new E(); // //# 13: static type warning, dynamic type error - new E(); // //# 14: static type warning, dynamic type error + new A(); // /// 01: static type warning + new A(); // /// 02: static type warning, dynamic type error + new A(); // /// 03: static type warning, dynamic type error + new B(); // /// 04: static type warning + new B(); // /// 05: static type warning, dynamic type error + new B(); // /// 06: static type warning, dynamic type error + new C(); // /// 07: static type warning + new C(); // /// 08: static type warning, dynamic type error + new C(); // /// 09: static type warning, dynamic type error + new D(); // /// 10: static type warning, dynamic type error + new D(); // /// 11: static type warning, dynamic type error + new D(); // /// 12: static type warning, dynamic type error + new E(); // /// 12: static type warning, dynamic type error + new E(); // /// 13: static type warning, dynamic type error + new E(); // /// 14: static type warning, dynamic type error } diff --git a/tests/language/mixin_invalid_bound_test.dart b/tests/language/mixin_invalid_bound_test.dart index 72f6af4fbd4..f0288e949f5 100644 --- a/tests/language/mixin_invalid_bound_test.dart +++ b/tests/language/mixin_invalid_bound_test.dart @@ -22,14 +22,14 @@ class D extends S with M { } class E extends S with M { } main() { - new A(); // //# 01: static type warning - new A(); // //# 02: static type warning, dynamic type error - new B(); // //# 03: static type warning - new B(); // //# 04: static type warning, dynamic type error - new C(); // //# 05: static type warning - new C(); // //# 06: static type warning, dynamic type error - new D(); // //# 07: static type warning, dynamic type error - new D(); // //# 08: static type warning, dynamic type error - new E(); // //# 09: static type warning, dynamic type error - new E(); // //# 10: static type warning, dynamic type error + new A(); // /// 01: static type warning + new A(); // /// 02: static type warning, dynamic type error + new B(); // /// 03: static type warning + new B(); // /// 04: static type warning, dynamic type error + new C(); // /// 05: static type warning + new C(); // /// 06: static type warning, dynamic type error + new D(); // /// 07: static type warning, dynamic type error + new D(); // /// 08: static type warning, dynamic type error + new E(); // /// 09: static type warning, dynamic type error + new E(); // /// 10: static type warning, dynamic type error } diff --git a/tests/language/mixin_invalid_inheritance1_test.dart b/tests/language/mixin_invalid_inheritance1_test.dart index ab30e92c918..2497c86db88 100644 --- a/tests/language/mixin_invalid_inheritance1_test.dart +++ b/tests/language/mixin_invalid_inheritance1_test.dart @@ -3,9 +3,9 @@ // BSD-style license that can be found in the LICENSE file. class C extends Object - with Malformed // //# 01: compile-time error - with T // //# 02: compile-time error - with T // //# 03: compile-time error + with Malformed // /// 01: compile-time error + with T // /// 02: compile-time error + with T // /// 03: compile-time error {} main() => new C(); diff --git a/tests/language/mixin_invalid_inheritance2_test.dart b/tests/language/mixin_invalid_inheritance2_test.dart index 9edca961595..fa1380a9b79 100644 --- a/tests/language/mixin_invalid_inheritance2_test.dart +++ b/tests/language/mixin_invalid_inheritance2_test.dart @@ -2,12 +2,12 @@ // 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. -class C = Object with Malformed; // //# 01: compile-time error -class C = Object with T; // //# 02: compile-time error -class C = OBject with T; // //# 03: compile-time error +class C = Object with Malformed; // /// 01: compile-time error +class C = Object with T; // /// 02: compile-time error +class C = OBject with T; // /// 03: compile-time error main() { - new C(); // //# 01: continued - new C(); // //# 02: continued - new C(); // //# 03: continued + new C(); // /// 01: continued + new C(); // /// 02: continued + new C(); // /// 03: continued } \ No newline at end of file diff --git a/tests/language/mixin_of_mixin_test.dart b/tests/language/mixin_of_mixin_test.dart index a686cf0f542..2ea3f3fa60d 100644 --- a/tests/language/mixin_of_mixin_test.dart +++ b/tests/language/mixin_of_mixin_test.dart @@ -35,26 +35,26 @@ class T6 extends D with M3 {} // extends a class which declares m3() main() { /// none: static type warning, ok - new T1().a(); // //# 01: static type warning, runtime error - new T1().b(); // //# 02: static type warning, runtime error - new T1().c(); // //# 03: static type warning, ok - new T2().a(); // //# 04: static type warning, runtime error - new T2().b(); // //# 05: static type warning, runtime error - new T2().c(); // //# 06: static type warning, runtime error - new T2().m2(); //# 07: static type warning, ok - new T3().a(); // //# 08: static type warning, runtime error - new T3().b(); // //# 09: static type warning, runtime error - new T3().c(); // //# 10: static type warning, runtime error - new T3().m3(); //# 11: static type warning, ok - new T4().a(); // //# 12: static type warning, runtime error - new T4().b(); // //# 13: static type warning, runtime error - new T4().c(); // //# 14: static type warning, ok - new T5().a(); // //# 15: static type warning, runtime error - new T5().b(); // //# 16: static type warning, runtime error - new T5().c(); // //# 17: static type warning, runtime error - new T5().m2(); //# 18: static type warning, ok - new T6().a(); // //# 19: static type warning, runtime error - new T6().b(); // //# 20: static type warning, runtime error - new T6().c(); // //# 21: static type warning, runtime error - new T6().m3(); //# 22: static type warning, ok + new T1().a(); // /// 01: static type warning, runtime error + new T1().b(); // /// 02: static type warning, runtime error + new T1().c(); // /// 03: static type warning, ok + new T2().a(); // /// 04: static type warning, runtime error + new T2().b(); // /// 05: static type warning, runtime error + new T2().c(); // /// 06: static type warning, runtime error + new T2().m2(); /// 07: static type warning, ok + new T3().a(); // /// 08: static type warning, runtime error + new T3().b(); // /// 09: static type warning, runtime error + new T3().c(); // /// 10: static type warning, runtime error + new T3().m3(); /// 11: static type warning, ok + new T4().a(); // /// 12: static type warning, runtime error + new T4().b(); // /// 13: static type warning, runtime error + new T4().c(); // /// 14: static type warning, ok + new T5().a(); // /// 15: static type warning, runtime error + new T5().b(); // /// 16: static type warning, runtime error + new T5().c(); // /// 17: static type warning, runtime error + new T5().m2(); /// 18: static type warning, ok + new T6().a(); // /// 19: static type warning, runtime error + new T6().b(); // /// 20: static type warning, runtime error + new T6().c(); // /// 21: static type warning, runtime error + new T6().m3(); /// 22: static type warning, ok } diff --git a/tests/language/mixin_super_bound2_test.dart b/tests/language/mixin_super_bound2_test.dart index f22fff687dc..87e8b7ab22d 100644 --- a/tests/language/mixin_super_bound2_test.dart +++ b/tests/language/mixin_super_bound2_test.dart @@ -16,19 +16,19 @@ bool inCheckedMode() { } class MS { } class M extends MS { } class NS { } class N extends NS { } class S { } @@ -51,7 +51,7 @@ main() { new MNA3(); new MNA4(); bool shouldThrow = false - || inCheckedMode() //# 01: continued + || inCheckedMode() /// 01: continued ; if (shouldThrow) { // Type parameter U of M must extend type parameter V, but diff --git a/tests/language/mixin_super_constructor_named_test.dart b/tests/language/mixin_super_constructor_named_test.dart index a6ec85a701e..998f5fb1bc8 100644 --- a/tests/language/mixin_super_constructor_named_test.dart +++ b/tests/language/mixin_super_constructor_named_test.dart @@ -7,7 +7,7 @@ import "package:expect/expect.dart"; class Base { int i, j; Base.ctor(int this.i - , {int this.j: 10} // //# 01: compile-time error + , {int this.j: 10} // /// 01: compile-time error ) { if (j == null) { j = 10; @@ -24,12 +24,12 @@ abstract class M { class C extends Base with M { int l = 131; - C.foo() : super.ctor(1, j: 13); //# 01: compile-time error + C.foo() : super.ctor(1, j: 13); /// 01: compile-time error C.bar() : super.ctor(1); } main() { - C c1 = new C.foo(); // //# 01: compile-time error + C c1 = new C.foo(); // /// 01: compile-time error C c2 = new C.bar(); Expect.equals(1, c2.i); Expect.equals(10, c2.j); diff --git a/tests/language/mixin_super_constructor_positionals_test.dart b/tests/language/mixin_super_constructor_positionals_test.dart index 6aad3c659c8..78b44bb8980 100644 --- a/tests/language/mixin_super_constructor_positionals_test.dart +++ b/tests/language/mixin_super_constructor_positionals_test.dart @@ -7,9 +7,9 @@ import "package:expect/expect.dart"; class Base { int i, j; Base.ctor(int this.i, - [ // //# 01: compile-time error + [ // /// 01: compile-time error int this.j - ] // //# 01: continued + ] // /// 01: continued ); } @@ -23,7 +23,7 @@ abstract class M { class C extends Base with M { int l = 131; C.foo() : super.ctor(1, 13); - C.bar() : super.ctor(1); // //# 01: continued + C.bar() : super.ctor(1); // /// 01: continued } main() { @@ -33,5 +33,5 @@ main() { Expect.equals(14, c1.foo()); Expect.equals(42, c1.k); Expect.equals(131, c1.l); - C c2 = new C.bar(); // //# 01: continued + C c2 = new C.bar(); // /// 01: continued } diff --git a/tests/language/mixin_supertype_subclass2_test.dart b/tests/language/mixin_supertype_subclass2_test.dart index d1b7f9149ee..d7ee5629117 100644 --- a/tests/language/mixin_supertype_subclass2_test.dart +++ b/tests/language/mixin_supertype_subclass2_test.dart @@ -18,11 +18,11 @@ class E extends B with C implements D {} class F extends E {} class A extends E with M {} class M - extends B //# 01: ok - extends C //# 02: static type warning - extends D //# 03: ok - extends E //# 04: ok - extends F //# 05: static type warning + extends B /// 01: ok + extends C /// 02: static type warning + extends D /// 03: ok + extends E /// 04: ok + extends F /// 05: static type warning {} main() { diff --git a/tests/language/mixin_supertype_subclass3_test.dart b/tests/language/mixin_supertype_subclass3_test.dart index 584e4443c00..7ca889d5d69 100644 --- a/tests/language/mixin_supertype_subclass3_test.dart +++ b/tests/language/mixin_supertype_subclass3_test.dart @@ -19,11 +19,11 @@ class D {} class E extends B with C implements D {} class F extends E {} class A - = E with M; class M = B with G; class G //# 01: ok - = E with M; class M = C with G; class G //# 02: static type warning - = E with M; class M = D with G; class G //# 03: ok - = E with M; class M = E with G; class G //# 04: ok - = E with M; class M = F with G; class G //# 05: static type warning + = E with M; class M = B with G; class G /// 01: ok + = E with M; class M = C with G; class G /// 02: static type warning + = E with M; class M = D with G; class G /// 03: ok + = E with M; class M = E with G; class G /// 04: ok + = E with M; class M = F with G; class G /// 05: static type warning {} main() { diff --git a/tests/language/mixin_supertype_subclass4_test.dart b/tests/language/mixin_supertype_subclass4_test.dart index 56fcf7f588a..e1a501a7349 100644 --- a/tests/language/mixin_supertype_subclass4_test.dart +++ b/tests/language/mixin_supertype_subclass4_test.dart @@ -24,11 +24,11 @@ class F extends E {} class G {} class A = E with M; class M - extends B with G //# 01: static type warning - extends C with G //# 02: static type warning - extends D with G //# 03: static type warning - extends E with G //# 04: static type warning - extends F with G //# 05: static type warning + extends B with G /// 01: static type warning + extends C with G /// 02: static type warning + extends D with G /// 03: static type warning + extends E with G /// 04: static type warning + extends F with G /// 05: static type warning {} main() { diff --git a/tests/language/mixin_supertype_subclass_test.dart b/tests/language/mixin_supertype_subclass_test.dart index 2ba3780f99c..70627f64d51 100644 --- a/tests/language/mixin_supertype_subclass_test.dart +++ b/tests/language/mixin_supertype_subclass_test.dart @@ -18,11 +18,11 @@ class E extends B with C implements D {} class F extends E {} class A = E with M; class M - extends B //# 01: ok - extends C //# 02: static type warning - extends D //# 03: ok - extends E //# 04: ok - extends F //# 05: static type warning + extends B /// 01: ok + extends C /// 02: static type warning + extends D /// 03: ok + extends E /// 04: ok + extends F /// 05: static type warning {} main() { diff --git a/tests/language/mixin_type_parameters_errors_test.dart b/tests/language/mixin_type_parameters_errors_test.dart index 3a1692021ac..f8ae1399b6c 100644 --- a/tests/language/mixin_type_parameters_errors_test.dart +++ b/tests/language/mixin_type_parameters_errors_test.dart @@ -6,17 +6,17 @@ class S { } class M { } class A extends S with M { } -class B extends S with M { } // //# 01: static type warning -class C extends S with M { } // //# 02: static type warning +class B extends S with M { } // /// 01: static type warning +class C extends S with M { } // /// 02: static type warning class F = S with M; -class G = S with M; // //# 05: static type warning +class G = S with M; // /// 05: static type warning main() { var a; a = new A(); a = new A(); - a = new A(); // //# 03: static type warning + a = new A(); // /// 03: static type warning a = new F(); - a = new F(); // //# 04: static type warning + a = new F(); // /// 04: static type warning } diff --git a/tests/language/mixin_type_variable_test.dart b/tests/language/mixin_type_variable_test.dart index 971b464118f..4d5c6c4bea3 100644 --- a/tests/language/mixin_type_variable_test.dart +++ b/tests/language/mixin_type_variable_test.dart @@ -10,23 +10,23 @@ class A { class B = Object with A; -class C extends B {} //# 03: ok -class D extends B {} //# 04: ok +class C extends B {} /// 03: ok +class D extends B {} /// 04: ok class E = Object with A; -class F extends E {} //# 06: ok +class F extends E {} /// 06: ok -class G extends Object with A {} //# 07: ok -class H extends Object with A {} //# 08: ok +class G extends Object with A {} /// 07: ok +class H extends Object with A {} /// 08: ok void main() { - new A(); //# 01: ok - new B(); //# 02: ok - new C(); //# 03: continued - new D(); //# 04: continued - new E(); //# 05: ok - new F(); //# 06: continued - new G(); //# 07: continued - new H(); //# 08: continued + new A(); /// 01: ok + new B(); /// 02: ok + new C(); /// 03: continued + new D(); /// 04: continued + new E(); /// 05: ok + new F(); /// 06: continued + new G(); /// 07: continued + new H(); /// 08: continued } \ No newline at end of file diff --git a/tests/language/multiline_newline_test.dart b/tests/language/multiline_newline_test.dart index 1c69440ce48..e081e90bf86 100644 --- a/tests/language/multiline_newline_test.dart +++ b/tests/language/multiline_newline_test.dart @@ -32,14 +32,14 @@ main() { Expect.isTrue(c2); Expect.isTrue(c3); - const c4 = c1 ? 1 : 2; // //# 01: ok - Expect.equals(1, c4); // //# 01: continued + const c4 = c1 ? 1 : 2; // /// 01: ok + Expect.equals(1, c4); // /// 01: continued - const c5 = c2 ? 2 : 3; // //# 02: ok - Expect.equals(2, c5); // //# 02: continued + const c5 = c2 ? 2 : 3; // /// 02: ok + Expect.equals(2, c5); // /// 02: continued - const c6 = c3 ? 3 : 4; // //# 03: ok - Expect.equals(3, c6); // //# 03: continued + const c6 = c3 ? 3 : 4; // /// 03: ok + Expect.equals(3, c6); // /// 03: continued const c7 = cr.constantMultilineString != crlf.constantMultilineString ? true : null; @@ -51,7 +51,7 @@ main() { Expect.isNull(c8); Expect.isNull(c9); - const c10 = c7 ? 1 : 2; // //# 04: compile-time error - const c11 = c8 ? 2 : 3; // //# 05: compile-time error - const c12 = c9 ? 3 : 4; // //# 06: compile-time error + const c10 = c7 ? 1 : 2; // /// 04: compile-time error + const c11 = c8 ? 2 : 3; // /// 05: compile-time error + const c12 = c9 ? 3 : 4; // /// 06: compile-time error } \ No newline at end of file diff --git a/tests/language/named_constructor_test.dart b/tests/language/named_constructor_test.dart index 2e6b9a41edc..6db3929f504 100644 --- a/tests/language/named_constructor_test.dart +++ b/tests/language/named_constructor_test.dart @@ -20,30 +20,30 @@ void main() { Expect.equals(1, new Class.named().value); Expect.equals(1, new Class.named().value); // 'Class.named' is not a type: - Expect.equals(1, new Class.named().value); //# 01: runtime error + Expect.equals(1, new Class.named().value); /// 01: runtime error // 'Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(1, new Class.named().value); //# 02: compile-time error + Expect.equals(1, new Class.named().value); /// 02: compile-time error Expect.equals(2, new prefix.Class().value); // 'prefix' is not a type: - Expect.equals(2, new prefix.Class().value); //# 03: runtime error + Expect.equals(2, new prefix.Class().value); /// 03: runtime error Expect.equals(2, new prefix.Class().value); // 'prefix.Class' doesn't fit the grammar syntax T.id: - Expect.equals(2, new prefix.Class().value); //# 04: compile-time error + Expect.equals(2, new prefix.Class().value); /// 04: compile-time error Expect.equals(3, new prefix.Class.named().value); // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 05: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 05: compile-time error // 'prefix.Class.named' doesn't fit the grammar syntax T.id: Expect.equals(3, new prefix.Class.named().value); // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 06: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 06: compile-time error // 'prefix.Class' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 07: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 07: compile-time error // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 08: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 08: compile-time error // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 09: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 09: compile-time error // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 10: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 10: compile-time error } \ No newline at end of file diff --git a/tests/language/named_parameters2_test.dart b/tests/language/named_parameters2_test.dart index 0de47e8f2f3..8c8bd8af4ed 100644 --- a/tests/language/named_parameters2_test.dart +++ b/tests/language/named_parameters2_test.dart @@ -14,7 +14,7 @@ main() { bool foundError = false; try { // Parameter b passed twice, as positional and named. - test(10, 25, b: 26); // //# static type warning + test(10, 25, b: 26); // /// static type warning } on NoSuchMethodError catch (e) { foundError = true; } diff --git a/tests/language/named_parameters_aggregated_test.dart b/tests/language/named_parameters_aggregated_test.dart index 7ff998561f0..4926c29a9d9 100644 --- a/tests/language/named_parameters_aggregated_test.dart +++ b/tests/language/named_parameters_aggregated_test.dart @@ -11,7 +11,7 @@ class TypeTester {} // Expect compile-time error as no default values are allowed // in closure type definitions. typedef void Callback([String msg - = "" // //# 01: compile-time error + = "" // /// 01: compile-time error ]); class NamedParametersAggregatedTests { @@ -21,7 +21,7 @@ class NamedParametersAggregatedTests { } static int f_missing_comma(a - [b = 42] //# 02: compile-time error + [b = 42] /// 02: compile-time error ) => a; var _handler = null; @@ -29,7 +29,7 @@ class NamedParametersAggregatedTests { // Expect compile-time error as no default values // are allowed in closure type. void InstallCallback(void cb({String msg - : null //# 03: compile-time error + : null /// 03: compile-time error })) { _handler = cb; } @@ -40,16 +40,16 @@ class NamedParametersAggregatedTests { main() { // Expect compile-time error due to missing comma in function definition. NamedParametersAggregatedTests.f_missing_comma(10 - , 25 // //# 02: continued + , 25 // /// 02: continued ); // Expect compile-time erorr due to duplicate named argument. NamedParametersAggregatedTests.F31(10, b:25 - , b:35 // //# 04: compile-time error + , b:35 // /// 04: compile-time error ); // Expect compile-time error due to missing positional argument. - Expect.throws(() => NamedParametersAggregatedTests.F31(b:25, c:35), (e) => e is NoSuchMethodError); // //# 05: static type warning + Expect.throws(() => NamedParametersAggregatedTests.F31(b:25, c:35), (e) => e is NoSuchMethodError); // /// 05: static type warning new TypeTester(); diff --git a/tests/language/named_parameters_default_eq_test.dart b/tests/language/named_parameters_default_eq_test.dart index bfa3f6a7456..96a4d2f4f09 100644 --- a/tests/language/named_parameters_default_eq_test.dart +++ b/tests/language/named_parameters_default_eq_test.dart @@ -7,7 +7,7 @@ import "package:expect/expect.dart"; // Default values are not allowed on typedefs. -typedef int F1({x = 3, y}); //# 01: compile-time error +typedef int F1({x = 3, y}); /// 01: compile-time error typedef int functype({x, y, z}); @@ -23,7 +23,7 @@ class A { factory A.redirectFactory({x, y, z}) = A; // Default values are not allowed on redirecting factory constructors. - factory A.badRedirectFactory({x = 3, y}) = A; //# 02: compile-time error + factory A.badRedirectFactory({x = 3, y}) = A; /// 02: compile-time error int get value => x * y * z; @@ -33,7 +33,7 @@ class A { main() { // Reference the type, or dart2js won't see that the declaration is invalid - F1 _ = null; // //# 01: continued + F1 _ = null; // /// 01: continued var a = new A(); diff --git a/tests/language/named_parameters_test.dart b/tests/language/named_parameters_test.dart index 29cc02317d2..2cf2ef24b55 100644 --- a/tests/language/named_parameters_test.dart +++ b/tests/language/named_parameters_test.dart @@ -66,28 +66,28 @@ class NamedParametersTest { Expect.equals(20, np.f21()); Expect.equals(20, F10(20)); Expect.equals(20, np.f21(20)); - Expect.equals(20, F10(b:20)); // //# 01: runtime error - Expect.equals(20, np.f21(b:20)); // //# 02: runtime error + Expect.equals(20, F10(b:20)); // /// 01: runtime error + Expect.equals(20, np.f21(b:20)); // /// 02: runtime error Expect.equals(1020, F21(10)); Expect.equals(1020, np.f32(10)); Expect.equals(1025, F21(10, 25)); Expect.equals(1025, np.f32(10, 25)); - Expect.equals(1025, F21(10, b:25)); // //# 03: runtime error - Expect.equals(1025, np.f32(10, b:25)); // //# 04: runtime error + Expect.equals(1025, F21(10, b:25)); // /// 03: runtime error + Expect.equals(1025, np.f32(10, b:25)); // /// 04: runtime error Expect.equals(102030, F31(10)); Expect.equals(102030, np.f42(10)); Expect.equals(102530, F31(10, 25)); Expect.equals(102530, np.f42(10, 25)); - Expect.equals(102035, F31(10, c:35)); // //# 05: runtime error - Expect.equals(102035, np.f42(10, c:35)); // //# 06: runtime error + Expect.equals(102035, F31(10, c:35)); // /// 05: runtime error + Expect.equals(102035, np.f42(10, c:35)); // /// 06: runtime error Expect.equals(102535, F31(10, 25, 35)); Expect.equals(102535, np.f42(10, 25, 35)); - Expect.equals(102535, F31(10, 25, c:35)); // //# 07: runtime error - Expect.equals(102535, np.f42(10, 25, c:35)); // //# 08: runtime error + Expect.equals(102535, F31(10, 25, c:35)); // /// 07: runtime error + Expect.equals(102535, np.f42(10, 25, c:35)); // /// 08: runtime error Expect.equals(10200040, F41(10)); Expect.equals(10200040, np.f52(10)); - Expect.equals(10203540, F41(10, c:35)); // //# 09: runtime error - Expect.equals(10203540, np.f52(10, c:35)); // //# 10: runtime error + Expect.equals(10203540, F41(10, c:35)); // /// 09: runtime error + Expect.equals(10203540, np.f52(10, c:35)); // /// 10: runtime error } } diff --git a/tests/language/named_parameters_type_test.dart b/tests/language/named_parameters_type_test.dart index 21c7e2a5e7d..e8c4b57b98d 100644 --- a/tests/language/named_parameters_type_test.dart +++ b/tests/language/named_parameters_type_test.dart @@ -17,7 +17,7 @@ main() { anyFunction = funNumOptBool; anyFunction = funNumOptBoolX; acceptFunNumOptBool(funNumOptBool); - acceptFunNumOptBool(funNum); // //# 01: runtime error - acceptFunNumOptBool(funNumBool); // //# 02: static type warning, runtime error - acceptFunNumOptBool(funNumOptBoolX); // //# 03: static type warning, runtime error + acceptFunNumOptBool(funNum); // /// 01: runtime error + acceptFunNumOptBool(funNumBool); // /// 02: static type warning, runtime error + acceptFunNumOptBool(funNumOptBoolX); // /// 03: static type warning, runtime error } diff --git a/tests/language/new_expression_type_args_test.dart b/tests/language/new_expression_type_args_test.dart index f4424fcdd03..60c80325552 100644 --- a/tests/language/new_expression_type_args_test.dart +++ b/tests/language/new_expression_type_args_test.dart @@ -5,18 +5,18 @@ // Tests showing errors using type-arguments in new expressions: class A { // Can't instantiate type parameter (within static or instance method). - m1() => new T(); // //# 00: static type warning, runtime error - static m2() => new T(); // //# 01: static type warning, runtime error + m1() => new T(); // /// 00: static type warning, runtime error + static m2() => new T(); // /// 01: static type warning, runtime error // OK when used within instance method, but not in static method. m3() => new A(); - static m4() => new A(); //# 02: static type warning + static m4() => new A(); /// 02: static type warning } main() { A a = new A(); - a.m1(); //# 00: continued - A.m2(); //# 01: continued + a.m1(); /// 00: continued + A.m2(); /// 01: continued a.m3(); - A.m4(); //# 02: continued + A.m4(); /// 02: continued } diff --git a/tests/language/new_prefix_test.dart b/tests/language/new_prefix_test.dart index 7b6d58f8c6c..0988b90e5d1 100644 --- a/tests/language/new_prefix_test.dart +++ b/tests/language/new_prefix_test.dart @@ -5,5 +5,5 @@ import 'dart:core' as prefix; main() { - return new prefix(); //# 01: static type warning, runtime error + return new prefix(); /// 01: static type warning, runtime error } diff --git a/tests/language/no_main_test.dart b/tests/language/no_main_test.dart index 0700b65c53e..24e5b37118b 100644 --- a/tests/language/no_main_test.dart +++ b/tests/language/no_main_test.dart @@ -2,6 +2,6 @@ // 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. -/* //# 01: static type warning, runtime error +/* /// 01: static type warning, runtime error main() {} -*/ //# 01: continued +*/ /// 01: continued diff --git a/tests/language/no_such_constructor_test.dart b/tests/language/no_such_constructor_test.dart index 3c4c7a9b6c6..40ade749107 100644 --- a/tests/language/no_such_constructor_test.dart +++ b/tests/language/no_such_constructor_test.dart @@ -9,5 +9,5 @@ class A { } main() { - new A(42); //# 01: static type warning, runtime error + new A(42); /// 01: static type warning, runtime error } diff --git a/tests/language/not_enough_positional_arguments_test.dart b/tests/language/not_enough_positional_arguments_test.dart index 33cffcd1046..ea50a09702c 100644 --- a/tests/language/not_enough_positional_arguments_test.dart +++ b/tests/language/not_enough_positional_arguments_test.dart @@ -15,13 +15,13 @@ class A { class B { B() - : super.test(b: 1) // //# 01: runtime error + : super.test(b: 1) // /// 01: runtime error ; } class C extends A { C() - : super.test(b: 1) // //# 02: runtime error + : super.test(b: 1) // /// 02: runtime error ; } @@ -32,16 +32,16 @@ class D { class E extends D { E() - : super.test(b: 1) // //# 05: runtime error + : super.test(b: 1) // /// 05: runtime error ; } main() { - new A.test(b: 1); // //# 00: runtime error + new A.test(b: 1); // /// 00: runtime error new B(); new C(); - new D.test(b: 1); // //# 03: runtime error + new D.test(b: 1); // /// 03: runtime error new E(); - foo(b: 1); // //# 06: runtime error - bar(b: 1); // //# 07: runtime error + foo(b: 1); // /// 06: runtime error + bar(b: 1); // /// 07: runtime error } diff --git a/tests/language/null_bottom_test.dart b/tests/language/null_bottom_test.dart index e13ad67f5a9..029c03190d7 100644 --- a/tests/language/null_bottom_test.dart +++ b/tests/language/null_bottom_test.dart @@ -113,7 +113,7 @@ void testFunctionTypes() { // If type promotion succeeds, the static type is int->Null, otherwise // it's Null->int. fun2(42); // Should not give a warning after type promotion. - fun2(null).abs(); // //# 03: runtime error + fun2(null).abs(); // /// 03: runtime error } } diff --git a/tests/language/null_is_bottom_test.dart b/tests/language/null_is_bottom_test.dart index 62f23f9bf8d..3dbe4168c9e 100644 --- a/tests/language/null_is_bottom_test.dart +++ b/tests/language/null_is_bottom_test.dart @@ -83,60 +83,60 @@ main() { var a = new A(); var listA = new List(); - testA(n); // //# 01: ok - testA(a); // //# 02: ok - testListA(listNull); // //# 03: ok - testListA(listA); // //# 04: ok - Expect.isTrue(testIsListA(listNull)); // //# 05: ok - Expect.isTrue(testIsListA(listA)); // //# 06: ok - testAsListA(listNull); // //# 07: ok - testAsListA(listA); // //# 08: ok + testA(n); // /// 01: ok + testA(a); // /// 02: ok + testListA(listNull); // /// 03: ok + testListA(listA); // /// 04: ok + Expect.isTrue(testIsListA(listNull)); // /// 05: ok + Expect.isTrue(testIsListA(listA)); // /// 06: ok + testAsListA(listNull); // /// 07: ok + testAsListA(listA); // /// 08: ok - testNull(n); // //# 09: ok - testNull(a); // //# 10: dynamic type error - testListNull(listNull); // //# 11: ok - testListNull(listA); // //# 12: dynamic type error - Expect.isTrue(testIsListNull(listNull)); // //# 13: ok - Expect.isFalse(testIsListNull(listA)); // //# 14: ok - testAsListNull(listNull); // //# 15: ok - Expect.throws(() => testAsListNull(listA), (e) => e is CastError); //# 16: ok + testNull(n); // /// 09: ok + testNull(a); // /// 10: dynamic type error + testListNull(listNull); // /// 11: ok + testListNull(listA); // /// 12: dynamic type error + Expect.isTrue(testIsListNull(listNull)); // /// 13: ok + Expect.isFalse(testIsListNull(listA)); // /// 14: ok + testAsListNull(listNull); // /// 15: ok + Expect.throws(() => testAsListNull(listA), (e) => e is CastError); /// 16: ok var returnNull = returnNullFunc; var takeNull = takeNullFunc; var returnA = returnAFunc; var takeA = takeAFunc; - testReturnA(returnA); // //# 17: ok - testReturnA(returnNull); // //# 18: ok - Expect.isTrue(testIsReturnA(returnA)); // //# 19: ok - Expect.isTrue(testIsReturnA(returnNull)); // //# 20: ok - testAsReturnA(returnA); // //# 21: ok - testAsReturnA(returnNull); // //# 22: ok + testReturnA(returnA); // /// 17: ok + testReturnA(returnNull); // /// 18: ok + Expect.isTrue(testIsReturnA(returnA)); // /// 19: ok + Expect.isTrue(testIsReturnA(returnNull)); // /// 20: ok + testAsReturnA(returnA); // /// 21: ok + testAsReturnA(returnNull); // /// 22: ok // This is not valid in strong-mode: ()->A <: ()->Null - testReturnNull(returnA); // //# 23: ok - testReturnNull(returnNull); // //# 24: ok + testReturnNull(returnA); // /// 23: ok + testReturnNull(returnNull); // /// 24: ok // This is not valid in strong-mode: ()->A <: ()->Null - Expect.isTrue(testIsReturnNull(returnA)); // //# 25: ok - Expect.isTrue(testIsReturnNull(returnNull)); // //# 26: ok + Expect.isTrue(testIsReturnNull(returnA)); // /// 25: ok + Expect.isTrue(testIsReturnNull(returnNull)); // /// 26: ok // This is not valid in strong-mode: ()->A <: ()->Null - testAsReturnNull(returnA); // //# 27: ok - testAsReturnNull(returnNull); // //# 28: ok + testAsReturnNull(returnA); // /// 27: ok + testAsReturnNull(returnNull); // /// 28: ok - testTakeA(takeA); // //# 29: ok + testTakeA(takeA); // /// 29: ok // This is not valid in strong-mode: (Null)-> <: (A)-> - testTakeA(takeNull); // //# 30: ok - Expect.isTrue(testIsTakeA(takeA)); // //# 31: ok + testTakeA(takeNull); // /// 30: ok + Expect.isTrue(testIsTakeA(takeA)); // /// 31: ok // This is not valid in strong-mode: (Null)-> <: (A)-> - Expect.isTrue(testIsTakeA(takeNull)); // //# 32: ok - testAsTakeA(takeA); // //# 33: ok + Expect.isTrue(testIsTakeA(takeNull)); // /// 32: ok + testAsTakeA(takeA); // /// 33: ok // This is not valid in strong-mode: (Null)-> <: (A)-> - testAsTakeA(takeNull); // //# 34: ok + testAsTakeA(takeNull); // /// 34: ok - testTakeNull(takeA); // //# 35: ok - testTakeNull(takeNull); // //# 36: ok - Expect.isTrue(testIsTakeNull(takeA)); // //# 37: ok - Expect.isTrue(testIsTakeNull(takeNull)); // //# 38: ok - testAsTakeNull(takeA); // //# 39: ok - testAsTakeNull(takeNull); // //# 40: ok + testTakeNull(takeA); // /// 35: ok + testTakeNull(takeNull); // /// 36: ok + Expect.isTrue(testIsTakeNull(takeA)); // /// 37: ok + Expect.isTrue(testIsTakeNull(takeNull)); // /// 38: ok + testAsTakeNull(takeA); // /// 39: ok + testAsTakeNull(takeNull); // /// 40: ok } \ No newline at end of file diff --git a/tests/language/null_is_bottom_type_test.dart b/tests/language/null_is_bottom_type_test.dart index 37e39cb715a..4c0549362a1 100644 --- a/tests/language/null_is_bottom_type_test.dart +++ b/tests/language/null_is_bottom_type_test.dart @@ -36,25 +36,25 @@ test() { A a = new A(); List listA; - testA(n); // //# 01: ok - testA(a); // //# 02: ok - testListA(listNull); // //# 03: ok - testListA(listA); // //# 04: ok + testA(n); // /// 01: ok + testA(a); // /// 02: ok + testListA(listNull); // /// 03: ok + testListA(listA); // /// 04: ok - testNull(n); // //# 05: ok - testNull(a); // //# 06: ok - testListNull(listNull); // //# 07: ok - testListNull(listA); // //# 08: ok + testNull(n); // /// 05: ok + testNull(a); // /// 06: ok + testListNull(listNull); // /// 07: ok + testListNull(listA); // /// 08: ok - testReturnA(returnA); // //# 09: ok - testReturnA(returnNull); // //# 10: ok + testReturnA(returnA); // /// 09: ok + testReturnA(returnNull); // /// 10: ok - testReturnNull(returnA); // //# 11: ok - testReturnNull(returnNull); // //# 12: ok + testReturnNull(returnA); // /// 11: ok + testReturnNull(returnNull); // /// 12: ok - testTakeA(takeA); // //# 13: ok - testTakeA(takeNull); // //# 14: ok + testTakeA(takeA); // /// 13: ok + testTakeA(takeNull); // /// 14: ok - testTakeNull(takeA); // //# 15: ok - testTakeNull(takeNull); // //# 16: ok + testTakeNull(takeA); // /// 15: ok + testTakeNull(takeNull); // /// 16: ok } \ No newline at end of file diff --git a/tests/language/null_test.dart b/tests/language/null_test.dart index 06debc054e6..b094d51f536 100644 --- a/tests/language/null_test.dart +++ b/tests/language/null_test.dart @@ -9,9 +9,9 @@ import "dart:mirrors"; import "package:expect/expect.dart"; class BadInherit - extends Null // //# 01: compile-time error - implements Null // //# 02: compile-time error - extends Object with Null // //# 03: compile-time error + extends Null // /// 01: compile-time error + implements Null // /// 02: compile-time error + extends Object with Null // /// 03: compile-time error {} class EqualsNotCalled { diff --git a/tests/language/number_identifier_test.dart b/tests/language/number_identifier_test.dart index 1279328d1f7..b4178c09d78 100644 --- a/tests/language/number_identifier_test.dart +++ b/tests/language/number_identifier_test.dart @@ -13,8 +13,8 @@ main() { Expect.isTrue(0x10is int); Expect.isTrue(-0x10is int); // "a" will be part of hex literal, the following "s" is an error. - 0x10as int; // //# 01: compile-time error - 0x; // //# 04: compile-time error + 0x10as int; // /// 01: compile-time error + 0x; // /// 04: compile-time error // Double literals. Expect.isTrue(2.0is double); @@ -29,16 +29,16 @@ main() { Expect.equals(1e-2, 1e-2as double); Expect.isTrue(1e+2is double); Expect.equals(1e+2, 1e+2as double); - Expect.throws(() => 1.e+2, // //# 05: ok - (e) => e is NoSuchMethodError); // //# 05: continued - 1d; // //# 06: compile-time error - 1D; // //# 07: compile-time error - Expect.throws(() => 1.d+2, // //# 08: ok - (e) => e is NoSuchMethodError); // //# 08: continued - Expect.throws(() => 1.D+2, // //# 09: ok - (e) => e is NoSuchMethodError); // //# 09: continued - 1.1d; // //# 10: compile-time error - 1.1D; // //# 11: compile-time error - 1e; // //# 02: compile-time error - 1x; // //# 03: compile-time error + Expect.throws(() => 1.e+2, // /// 05: ok + (e) => e is NoSuchMethodError); // /// 05: continued + 1d; // /// 06: compile-time error + 1D; // /// 07: compile-time error + Expect.throws(() => 1.d+2, // /// 08: ok + (e) => e is NoSuchMethodError); // /// 08: continued + Expect.throws(() => 1.D+2, // /// 09: ok + (e) => e is NoSuchMethodError); // /// 09: continued + 1.1d; // /// 10: compile-time error + 1.1D; // /// 11: compile-time error + 1e; // /// 02: compile-time error + 1x; // /// 03: compile-time error } diff --git a/tests/language/optional_named_parameters_test.dart b/tests/language/optional_named_parameters_test.dart index 002b5391f5c..94e56426cd4 100644 --- a/tests/language/optional_named_parameters_test.dart +++ b/tests/language/optional_named_parameters_test.dart @@ -64,28 +64,28 @@ class OptionalNamedParametersTest { Expect.equals(10, np.f22(10)); Expect.equals(20, F10()); Expect.equals(20, np.f21()); - Expect.equals(20, F10(20)); // //# 01: runtime error - Expect.equals(20, np.f21(20)); // //# 02: runtime error + Expect.equals(20, F10(20)); // /// 01: runtime error + Expect.equals(20, np.f21(20)); // /// 02: runtime error Expect.equals(20, F10(b:20)); Expect.equals(20, np.f21(b:20)); Expect.equals(1020, F21(10)); Expect.equals(1020, np.f32(10)); - Expect.equals(1025, F21(10, 25)); // //# 03: runtime error - Expect.equals(1025, np.f32(10, 25)); // //# 04: runtime error + Expect.equals(1025, F21(10, 25)); // /// 03: runtime error + Expect.equals(1025, np.f32(10, 25)); // /// 04: runtime error Expect.equals(1025, F21(10, b:25)); Expect.equals(1025, np.f32(10, b:25)); Expect.equals(102030, F31(10)); Expect.equals(102030, np.f42(10)); - Expect.equals(102530, F31(10, 25)); // //# 05: runtime error - Expect.equals(102530, np.f42(10, 25)); // //# 06: runtime error + Expect.equals(102530, F31(10, 25)); // /// 05: runtime error + Expect.equals(102530, np.f42(10, 25)); // /// 06: runtime error Expect.equals(102530, F31(10, b:25)); Expect.equals(102530, np.f42(10, b:25)); Expect.equals(102035, F31(10, c:35)); Expect.equals(102035, np.f42(10, c:35)); Expect.equals(102535, F31(10, b:25, c:35)); Expect.equals(102535, np.f42(10, b:25, c:35)); - Expect.equals(102535, F31(10, 25, c:35)); // //# 07: runtime error - Expect.equals(102535, np.f42(10, 25, c:35)); // //# 08: runtime error + Expect.equals(102535, F31(10, 25, c:35)); // /// 07: runtime error + Expect.equals(102535, np.f42(10, 25, c:35)); // /// 08: runtime error Expect.equals(102535, F31(10, c:35, b:25)); Expect.equals(102535, np.f42(10, c:35, b:25)); Expect.equals(10200040, F41(10)); @@ -93,7 +93,7 @@ class OptionalNamedParametersTest { Expect.equals(10203540, F41(10, c:35)); Expect.equals(10203540, np.f52(10, c:35)); Expect.equals(10250045, F41(10, d:45, b:25)); - Expect.equals(10250045, F41(10, 25, d:45)); // //# 09: runtime error + Expect.equals(10250045, F41(10, 25, d:45)); // /// 09: runtime error Expect.equals(10250045, np.f52(10, d:45, b:25)); Expect.equals(10253545, F41(10, d:45, c:35, b:25)); Expect.equals(10253545, np.f52(10, d:45, c:35, b:25)); diff --git a/tests/language/override_field_test.dart b/tests/language/override_field_test.dart index 9e7676113a5..1fa79683f61 100644 --- a/tests/language/override_field_test.dart +++ b/tests/language/override_field_test.dart @@ -9,9 +9,9 @@ class A { } class B extends A { - static int instanceFieldInA; // //# 01: compile-time error - int staticFieldInA; // //# 02: static type warning - static int staticFieldInA; // //# 03: static type warning + static int instanceFieldInA; // /// 01: compile-time error + int staticFieldInA; // /// 02: static type warning + static int staticFieldInA; // /// 03: static type warning } main() { diff --git a/tests/language/override_inheritance_abstract_test.dart b/tests/language/override_inheritance_abstract_test.dart index 0b40b88dc4c..32fb7d13f64 100644 --- a/tests/language/override_inheritance_abstract_test.dart +++ b/tests/language/override_inheritance_abstract_test.dart @@ -3,62 +3,62 @@ // BSD-style license that can be found in the LICENSE file. abstract class A { - method1(); //# 01: ok - method5(); //# 05: ok - method6(); //# 06: ok - method7(); //# 07: static type warning - get getter8; //# 08: static type warning - set setter9(_); //# 09: static type warning - method10(); //# 10: static type warning - get getter11; //# 11: static type warning - set setter12(_); //# 12: static type warning - get field13; //# 13: static type warning - set field14(_); //# 14: static type warning - method18() {} //# 18: ok - method27() {} //# 27: ok + method1(); /// 01: ok + method5(); /// 05: ok + method6(); /// 06: ok + method7(); /// 07: static type warning + get getter8; /// 08: static type warning + set setter9(_); /// 09: static type warning + method10(); /// 10: static type warning + get getter11; /// 11: static type warning + set setter12(_); /// 12: static type warning + get field13; /// 13: static type warning + set field14(_); /// 14: static type warning + method18() {} /// 18: ok + method27() {} /// 27: ok } abstract class I { - method10() {} //# 10: continued - get getter11 => 0; //# 11: continued - set setter12(_) {} //# 12: continued - var field13; //# 13: continued - var field14; //# 14: continued - method15() {} //# 15: ok - method16() {} //# 16: ok - method17() {} //# 17: static type warning - method18() {} //# 18: continued - var member19; //# 19: static type warning - var member20; //# 20: static type warning - var member21; //# 21: static type warning - get member22 => 0; //# 22: static type warning - set member23(_) {} //# 23: static type warning - var member24; //# 24: static type warning - var field25; //# 25: static type warning - var member26; //# 26: static type warning + method10() {} /// 10: continued + get getter11 => 0; /// 11: continued + set setter12(_) {} /// 12: continued + var field13; /// 13: continued + var field14; /// 14: continued + method15() {} /// 15: ok + method16() {} /// 16: ok + method17() {} /// 17: static type warning + method18() {} /// 18: continued + var member19; /// 19: static type warning + var member20; /// 20: static type warning + var member21; /// 21: static type warning + get member22 => 0; /// 22: static type warning + set member23(_) {} /// 23: static type warning + var member24; /// 24: static type warning + var field25; /// 25: static type warning + var member26; /// 26: static type warning } abstract class J { - get member20 => null; //# 20: continued - set member20(_) {} //# 20: continued - var member21; //# 21: continued + get member20 => null; /// 20: continued + set member20(_) {} /// 20: continued + var member21; /// 21: continued } class Class extends A implements I, J { - method1() {} //# 01: continued - method2(); //# 02: static type warning - get getter3; //# 03: static type warning - set setter4(_); //# 04: static type warning - method5() {} //# 05: continued - method6([a]) {} //# 06: continued - set field13(_) {} //# 13: continued - get field14 => 0; //# 14: continued - method15() {} //# 15: continued - method16([a]) {} //# 16: continued - get member24 => 0; //# 24: continued - final field25 = 0; //# 25: continued - set member26(_) {} //# 26: continued - method27(); //# 27: continued + method1() {} /// 01: continued + method2(); /// 02: static type warning + get getter3; /// 03: static type warning + set setter4(_); /// 04: static type warning + method5() {} /// 05: continued + method6([a]) {} /// 06: continued + set field13(_) {} /// 13: continued + get field14 => 0; /// 14: continued + method15() {} /// 15: continued + method16([a]) {} /// 16: continued + get member24 => 0; /// 24: continued + final field25 = 0; /// 25: continued + set member26(_) {} /// 26: continued + method27(); /// 27: continued } main() { diff --git a/tests/language/override_inheritance_field_test.dart b/tests/language/override_inheritance_field_test.dart index 8d368d56c82..7e2b28bff30 100644 --- a/tests/language/override_inheritance_field_test.dart +++ b/tests/language/override_inheritance_field_test.dart @@ -3,119 +3,119 @@ // BSD-style license that can be found in the LICENSE file. class A { - get getter1 => null; //# 01: ok - num get getter2 => null; //# 02: ok - num get getter3 => null; //# 03: ok - int get getter4 => null; //# 04: ok - int get getter5 => null; //# 05: static type warning - int get getter6 => null; //# 06: ok - int get getter7 => null; //# 07: static type warning - int get getter8 => null; //# 08: static type warning + get getter1 => null; /// 01: ok + num get getter2 => null; /// 02: ok + num get getter3 => null; /// 03: ok + int get getter4 => null; /// 04: ok + int get getter5 => null; /// 05: static type warning + int get getter6 => null; /// 06: ok + int get getter7 => null; /// 07: static type warning + int get getter8 => null; /// 08: static type warning - set setter1(_) => null; //# 21: ok - void set setter2(_) {} //# 22: ok - set setter3(_) => null; //# 23: ok - set setter4(_) => null; //# 24: ok - set setter5(num _) => null; //# 25: ok - set setter6(num _) => null; //# 26: ok - set setter7(int _) => null; //# 27: ok - set setter8(int _) => null; //# 28: static type warning - set setter9(int _) => null; //# 29: ok - set setter10(int _) => null; //# 30: static type warning - set setter11(int _) => null; //# 31: static type warning + set setter1(_) => null; /// 21: ok + void set setter2(_) {} /// 22: ok + set setter3(_) => null; /// 23: ok + set setter4(_) => null; /// 24: ok + set setter5(num _) => null; /// 25: ok + set setter6(num _) => null; /// 26: ok + set setter7(int _) => null; /// 27: ok + set setter8(int _) => null; /// 28: static type warning + set setter9(int _) => null; /// 29: ok + set setter10(int _) => null; /// 30: static type warning + set setter11(int _) => null; /// 31: static type warning - int field1; //# 41: ok - num field2; //# 42: ok - int field3; //# 43: ok - int field4; //# 44: static type warning - int field5; //# 45: ok - num field6; //# 46: ok - num field7; //# 47: static type warning - num get field8 => null; //# 48: static type warning - num field9; //# 49: ok - num field10; //# 50: ok - set field11(int _) {} //# 51: ok - void set field12(int _) {} //# 52: ok - num field13; //# 53: static type warning - set field14(num _) {} //# 54: static type warning + int field1; /// 41: ok + num field2; /// 42: ok + int field3; /// 43: ok + int field4; /// 44: static type warning + int field5; /// 45: ok + num field6; /// 46: ok + num field7; /// 47: static type warning + num get field8 => null; /// 48: static type warning + num field9; /// 49: ok + num field10; /// 50: ok + set field11(int _) {} /// 51: ok + void set field12(int _) {} /// 52: ok + num field13; /// 53: static type warning + set field14(num _) {} /// 54: static type warning } class B extends A { - num get getter6 => null; //# 06: continued - set setter9(num _) => null; //# 29: continued - num field5; //# 45: continued + num get getter6 => null; /// 06: continued + set setter9(num _) => null; /// 29: continued + num field5; /// 45: continued } abstract class I { - num get getter7 => null; //# 07: continued - String get getter8 => null; //# 08: continued - int get getter9 => null; //# 09: static type warning - int get getter10 => null; //# 10: static type warning - int get getter11 => null; //# 11: static type warning - set setter10(num _) => null; //# 30: continued - set setter11(String _) => null; //# 31: continued - set setter12(int _) => null; //# 32: static type warning - set setter13(int _) => null; //# 33: static type warning - set setter13(num _) => null; //# 33a: static type warning - set setter14(int _) => null; //# 34: static type warning + num get getter7 => null; /// 07: continued + String get getter8 => null; /// 08: continued + int get getter9 => null; /// 09: static type warning + int get getter10 => null; /// 10: static type warning + int get getter11 => null; /// 11: static type warning + set setter10(num _) => null; /// 30: continued + set setter11(String _) => null; /// 31: continued + set setter12(int _) => null; /// 32: static type warning + set setter13(int _) => null; /// 33: static type warning + set setter13(num _) => null; /// 33a: static type warning + set setter14(int _) => null; /// 34: static type warning } abstract class J { - String get getter9 => null; //# 09: continued - num get getter10 => null; //# 10: continued - num get getter11 => null; //# 11: continued - set setter12(String _) => null; //# 32: continued - set setter13(num _) => null; //# 33: continued - set setter13(int _) => null; //# 33a: continued - set setter14(num _) => null; //# 34: continued + String get getter9 => null; /// 09: continued + num get getter10 => null; /// 10: continued + num get getter11 => null; /// 11: continued + set setter12(String _) => null; /// 32: continued + set setter13(num _) => null; /// 33: continued + set setter13(int _) => null; /// 33a: continued + set setter14(num _) => null; /// 34: continued } abstract class Class extends B implements I, J { - get getter1 => null; //# 01: continued - num get getter2 => null; //# 02: continued - int get getter3 => null; //# 03: continued - num get getter4 => null; //# 04: continued - double get getter5 => null; //# 05: continued - double get getter6 => null; //# 06: continued - double get getter7 => null; //# 07: continued - double get getter8 => null; //# 08: continued - double get getter9 => null; //# 09: continued + get getter1 => null; /// 01: continued + num get getter2 => null; /// 02: continued + int get getter3 => null; /// 03: continued + num get getter4 => null; /// 04: continued + double get getter5 => null; /// 05: continued + double get getter6 => null; /// 06: continued + double get getter7 => null; /// 07: continued + double get getter8 => null; /// 08: continued + double get getter9 => null; /// 09: continued - set setter1(_) => null; //# 21: continued - set setter2(_) => null; //# 22: continued - void set setter3(_) {} //# 23: continued - void set setter4(_) {} //# 24: continued - set setter5(num _) => null; //# 25: continued - set setter6(int _) => null; //# 26: continued - set setter7(num _) => null; //# 27: continued - set setter8(double _) => null; //# 28: continued - set setter9(double _) => null; //# 29: continued - set setter10(double _) => null; //# 30: continued - set setter11(double _) => null; //# 31: continued - set setter12(double _) => null; //# 32: continued + set setter1(_) => null; /// 21: continued + set setter2(_) => null; /// 22: continued + void set setter3(_) {} /// 23: continued + void set setter4(_) {} /// 24: continued + set setter5(num _) => null; /// 25: continued + set setter6(int _) => null; /// 26: continued + set setter7(num _) => null; /// 27: continued + set setter8(double _) => null; /// 28: continued + set setter9(double _) => null; /// 29: continued + set setter10(double _) => null; /// 30: continued + set setter11(double _) => null; /// 31: continued + set setter12(double _) => null; /// 32: continued - int field1; //# 41: continued - int field2; //# 42: continued - num field3; //# 43: continued - double field4; //# 44: continued - double field5; //# 45: continued - int get field6 => null; //# 46: continued - String get field7 => null; //# 47: continued - String field8; //# 48: continued - set field9(int _) {} //# 49: continued - void set field10(int _) {} //# 50: continued - num field11; //# 51: continued - num field12; //# 52: continued - set field13(String _) {} //# 53: continued - String field14; //# 54: continued + int field1; /// 41: continued + int field2; /// 42: continued + num field3; /// 43: continued + double field4; /// 44: continued + double field5; /// 45: continued + int get field6 => null; /// 46: continued + String get field7 => null; /// 47: continued + String field8; /// 48: continued + set field9(int _) {} /// 49: continued + void set field10(int _) {} /// 50: continued + num field11; /// 51: continued + num field12; /// 52: continued + set field13(String _) {} /// 53: continued + String field14; /// 54: continued } class SubClass extends Class { - double get getter10 => null; //# 10: continued - String get getter11 => null; //# 11: continued - set setter13(double _) => null; //# 33: continued - set setter13(double _) => null; //# 33a: continued - set setter14(String _) => null; //# 34: continued + double get getter10 => null; /// 10: continued + String get getter11 => null; /// 11: continued + set setter13(double _) => null; /// 33: continued + set setter13(double _) => null; /// 33a: continued + set setter14(String _) => null; /// 34: continued } main() { diff --git a/tests/language/override_inheritance_generic_test.dart b/tests/language/override_inheritance_generic_test.dart index 2e00ceefb8f..bf6ae37ad5f 100644 --- a/tests/language/override_inheritance_generic_test.dart +++ b/tests/language/override_inheritance_generic_test.dart @@ -3,68 +3,68 @@ // BSD-style license that can be found in the LICENSE file. class A { - method1(T t) => null; //# 01: ok - method2(T t) => null; //# 02: ok - method4(T t) => null; //# 04: static type warning - method5(T t) => null; //# 05: ok - method7(T t) => null; //# 07: static type warning + method1(T t) => null; /// 01: ok + method2(T t) => null; /// 02: ok + method4(T t) => null; /// 04: static type warning + method5(T t) => null; /// 05: ok + method7(T t) => null; /// 07: static type warning } class B extends A - //# 01: continued - //# 02: continued - //# 04: continued - //# 05: continued + /// 01: continued + /// 02: continued + /// 04: continued + /// 05: continued { - method1(S s) => null; //# 01: continued - method2(int i) => null; //# 02: continued - method3(S s) => null; //# 03: ok - method4(int i) => null; //# 04: continued - method6(S s) => null; //# 06: static type warning + method1(S s) => null; /// 01: continued + method2(int i) => null; /// 02: continued + method3(S s) => null; /// 03: ok + method4(int i) => null; /// 04: continued + method6(S s) => null; /// 06: static type warning } abstract class I { - method3(U u) => null; //# 03: continued - method6(U u) => null; //# 06: continued - method7(U u) => null; //# 07: continued - method8(U u) => null; //# 08: static type warning - method9(U u) => null; //# 09: static type warning - method10(U u) => null; //# 10: static type warning + method3(U u) => null; /// 03: continued + method6(U u) => null; /// 06: continued + method7(U u) => null; /// 07: continued + method8(U u) => null; /// 08: static type warning + method9(U u) => null; /// 09: static type warning + method10(U u) => null; /// 10: static type warning } abstract class J { - method8(V v) => null; //# 08: continued - method9(V v) => null; //# 09: continued - method10(V v) => null; //# 10: continued + method8(V v) => null; /// 08: continued + method9(V v) => null; /// 09: continued + method10(V v) => null; /// 10: continued } abstract class Class extends B - //# 03: continued - //# 05: continued - //# 06: continued - //# 07: continued + /// 03: continued + /// 05: continued + /// 06: continued + /// 07: continued implements I - //# 03: continued - //# 06: continued - //# 07: continued - //# 08: continued - //# 09: continued - //# 10: continued + /// 03: continued + /// 06: continued + /// 07: continued + /// 08: continued + /// 09: continued + /// 10: continued , J - //# 08: continued - //# 09: continued - //# 10: continued + /// 08: continued + /// 09: continued + /// 10: continued { - method3(num i) => null; //# 03: continued - method5(W w) => null; //# 05: continued - method6(int i) => null; //# 06: continued - method7(double d) => null; //# 07: continued - method8(double d) => null; //# 08: continued + method3(num i) => null; /// 03: continued + method5(W w) => null; /// 05: continued + method6(int i) => null; /// 06: continued + method7(double d) => null; /// 07: continued + method8(double d) => null; /// 08: continued } class SubClass extends Class { - method9(double d) => null; //# 09: continued - method10(String s) => null; //# 10: continued + method9(double d) => null; /// 09: continued + method10(String s) => null; /// 10: continued } main() { diff --git a/tests/language/override_inheritance_method_test.dart b/tests/language/override_inheritance_method_test.dart index 990b09a6c64..ea699b53703 100644 --- a/tests/language/override_inheritance_method_test.dart +++ b/tests/language/override_inheritance_method_test.dart @@ -5,94 +5,94 @@ // Test static warnings for method overrides. class A { - method1() => null; //# 01: ok - method2(a) => null; //# 02: ok - method3(a, b, c, d) => null; //# 03: ok - method4() => null; //# 04: static type warning - method6(a, b, c) => null; //# 06: static type warning - method7([a]) => null; //# 07: ok - method8([a, b]) => null; //# 08: ok - method9([a, b, c]) => null; //# 09: ok - method10([a]) => null; //# 10: ok - method11(a) => null; //# 11: static type warning - method12(a, [b]) => null; //# 12: static type warning - method13(a, [b]) => null; //# 13: static type warning - method14(a, b, [c, d, e]) => null; //# 14: static type warning - method15({a}) => null; //# 15: ok - method16({a, b}) => null; //# 16: ok - method17({a, b, c}) => null; //# 17: ok - method18(d, {a, b, c}) => null; //# 18: ok - method19({a}) => null; //# 19: static type warning - method20({a, b}) => null; //# 20: static type warning - method21({a, b, c, d}) => null; //# 21: static type warning + method1() => null; /// 01: ok + method2(a) => null; /// 02: ok + method3(a, b, c, d) => null; /// 03: ok + method4() => null; /// 04: static type warning + method6(a, b, c) => null; /// 06: static type warning + method7([a]) => null; /// 07: ok + method8([a, b]) => null; /// 08: ok + method9([a, b, c]) => null; /// 09: ok + method10([a]) => null; /// 10: ok + method11(a) => null; /// 11: static type warning + method12(a, [b]) => null; /// 12: static type warning + method13(a, [b]) => null; /// 13: static type warning + method14(a, b, [c, d, e]) => null; /// 14: static type warning + method15({a}) => null; /// 15: ok + method16({a, b}) => null; /// 16: ok + method17({a, b, c}) => null; /// 17: ok + method18(d, {a, b, c}) => null; /// 18: ok + method19({a}) => null; /// 19: static type warning + method20({a, b}) => null; /// 20: static type warning + method21({a, b, c, d}) => null; /// 21: static type warning - method22(int a) => null; //# 22: ok - method23(int a) => null; //# 23: ok - void method24() {} //# 24: ok - method25() => null; //# 25: ok - void method26() {} //# 26: ok - int method27() => null; //# 27: static type warning - method28(int a) => null; //# 28: ok - method29(int a) => null; //# 29: ok - method30(int a) => null; //# 30: static type warning + method22(int a) => null; /// 22: ok + method23(int a) => null; /// 23: ok + void method24() {} /// 24: ok + method25() => null; /// 25: ok + void method26() {} /// 26: ok + int method27() => null; /// 27: static type warning + method28(int a) => null; /// 28: ok + method29(int a) => null; /// 29: ok + method30(int a) => null; /// 30: static type warning } class B extends A { - method28(num a) => null; //# 28: continued - method29(a) => null; //# 29: continued + method28(num a) => null; /// 28: continued + method29(a) => null; /// 29: continued } abstract class I { - method5() => null; //# 05: static type warning - method31(int a) => null; //# 31: static type warning - method32(int a) => null; //# 32: static type warning - method33(num a) => null; //# 33: static type warning + method5() => null; /// 05: static type warning + method31(int a) => null; /// 31: static type warning + method32(int a) => null; /// 32: static type warning + method33(num a) => null; /// 33: static type warning } abstract class J { - method31(num a) => null; //# 31: continued - method32(double a) => null; //# 32: continued - method33(int a) => null; //# 33: continued + method31(num a) => null; /// 31: continued + method32(double a) => null; /// 32: continued + method33(int a) => null; /// 33: continued } class Class extends B implements I, J { - method1() => null; //# 01: continued - method2(b) => null; //# 02: continued - method3(b, a, d, c) => null; //# 03: continued - method4(a) => null; //# 04: continued - method5(a) => null; //# 05: continued - method6(a, b, c, d) => null; //# 06: continued - method7([a]) => null; //# 07: continued - method8([b, a]) => null; //# 08: continued - method9([b, d, a, c]) => null; //# 09: continued - method10([a]) => null; //# 10: continued - method11() => null; //# 11: continued - method12(a) => null; //# 12: continued - method13([a]) => null; //# 13: continued - method14([a, b, c, d]) => null; //# 14: continued - method15({a}) => null; //# 15: continued - method16({b, a}) => null; //# 16: continued - method17({b, c, a, d}) => null; //# 17: continued - method18(e, {b, c, a, d}) => null; //# 18: continued - method19() => null; //# 19: continued - method20({b}) => null; //# 20: continued - method21({a, e, d, c}) => null; //# 21: continued + method1() => null; /// 01: continued + method2(b) => null; /// 02: continued + method3(b, a, d, c) => null; /// 03: continued + method4(a) => null; /// 04: continued + method5(a) => null; /// 05: continued + method6(a, b, c, d) => null; /// 06: continued + method7([a]) => null; /// 07: continued + method8([b, a]) => null; /// 08: continued + method9([b, d, a, c]) => null; /// 09: continued + method10([a]) => null; /// 10: continued + method11() => null; /// 11: continued + method12(a) => null; /// 12: continued + method13([a]) => null; /// 13: continued + method14([a, b, c, d]) => null; /// 14: continued + method15({a}) => null; /// 15: continued + method16({b, a}) => null; /// 16: continued + method17({b, c, a, d}) => null; /// 17: continued + method18(e, {b, c, a, d}) => null; /// 18: continued + method19() => null; /// 19: continued + method20({b}) => null; /// 20: continued + method21({a, e, d, c}) => null; /// 21: continued - method22(int a) => null; //# 22: continued - method23(num a) => null; //# 23: continued - method24() => null; //# 24: continued - void method25() {} //# 25: continued - int method26() => null; //# 26: continued - void method27() {} //# 27: continued - method28(double a) => null; //# 28: continued - method29(String a) => null; //# 29: continued - method30(String a) => null; //# 30: continued + method22(int a) => null; /// 22: continued + method23(num a) => null; /// 23: continued + method24() => null; /// 24: continued + void method25() {} /// 25: continued + int method26() => null; /// 26: continued + void method27() {} /// 27: continued + method28(double a) => null; /// 28: continued + method29(String a) => null; /// 29: continued + method30(String a) => null; /// 30: continued } class SubClass extends Class { - method31(double a) => null; //# 31: continued - method32(String a) => null; //# 32: continued - method33(double a) => null; //# 33: continued + method31(double a) => null; /// 31: continued + method32(String a) => null; /// 32: continued + method33(double a) => null; /// 33: continued } main() { diff --git a/tests/language/override_inheritance_mixed_test.dart b/tests/language/override_inheritance_mixed_test.dart index 9a43d159e25..199b466d7c9 100644 --- a/tests/language/override_inheritance_mixed_test.dart +++ b/tests/language/override_inheritance_mixed_test.dart @@ -3,39 +3,39 @@ // BSD-style license that can be found in the LICENSE file. class A { - var member1; //# 01: compile-time error - member2() {} //# 02: compile-time error - get member3 => null; //# 03: compile-time error - member4() {} //# 04: compile-time error + var member1; /// 01: compile-time error + member2() {} /// 02: compile-time error + get member3 => null; /// 03: compile-time error + member4() {} /// 04: compile-time error } abstract class I { - var member5; //# 05: ok - var member6; //# 06: static type warning - get member7; //# 07: static type warning - get member8; //# 08: static type warning - get member9; //# 09: static type warning + var member5; /// 05: ok + var member6; /// 06: static type warning + get member7; /// 07: static type warning + get member8; /// 08: static type warning + get member9; /// 09: static type warning } abstract class J { - get member5; //# 05: continued - member6() {} //# 06: continued - member7() {} //# 07: continued - member8() {} //# 08: continued - member9() {} //# 09: continued + get member5; /// 05: continued + member6() {} /// 06: continued + member7() {} /// 07: continued + member8() {} /// 08: continued + member9() {} /// 09: continued } abstract class B extends A implements I, J { } class Class extends B { - member1() {} //# 01: continued - var member2; //# 02: continued - member3() {} //# 03: continued - get member4 => null; //# 04: continued - var member5; //# 05: continued - member8() {} //# 08: continued - get member9 => null; //# 09: continued + member1() {} /// 01: continued + var member2; /// 02: continued + member3() {} /// 03: continued + get member4 => null; /// 04: continued + var member5; /// 05: continued + member8() {} /// 08: continued + get member9 => null; /// 09: continued } main() { diff --git a/tests/language/override_inheritance_no_such_method_test.dart b/tests/language/override_inheritance_no_such_method_test.dart index 7b262bbf369..80409e0f9b0 100644 --- a/tests/language/override_inheritance_no_such_method_test.dart +++ b/tests/language/override_inheritance_no_such_method_test.dart @@ -6,45 +6,45 @@ // concrete classes. abstract class A { - method6(); //# 06: static type warning - method7(); //# 07: static type warning - method8(); //# 08: ok + method6(); /// 06: static type warning + method7(); /// 07: static type warning + method8(); /// 08: ok } abstract class I { - method9(); //# 09: static type warning - method10(); //# 10: static type warning - method11(); //# 11: ok + method9(); /// 09: static type warning + method10(); /// 10: static type warning + method11(); /// 11: ok } -@proxy //# 02: static type warning -@proxy //# 07: continued -@proxy //# 10: continued +@proxy /// 02: static type warning +@proxy /// 07: continued +@proxy /// 10: continued class Class1 extends A implements I { - method1(); //# 01: static type warning + method1(); /// 01: static type warning - method2(); //# 02: continued + method2(); /// 02: continued - noSuchMethod(_) => null; //# 03: ok - method3(); //# 03: continued + noSuchMethod(_) => null; /// 03: ok + method3(); /// 03: continued - noSuchMethod(_, [__]) => null; //# 04: ok - method4(); //# 04: continued + noSuchMethod(_, [__]) => null; /// 04: ok + method4(); /// 04: continued - noSuchMethod(_); //# 05: ok - method5(); //# 05: continued + noSuchMethod(_); /// 05: ok + method5(); /// 05: continued - noSuchMethod(_) => null; //# 08: continued + noSuchMethod(_) => null; /// 08: continued - noSuchMethod(_) => null; //# 11: continued + noSuchMethod(_) => null; /// 11: continued } -@proxy //# 12: static type warning +@proxy /// 12: static type warning class B { - method12(); //# 12: continued + method12(); /// 12: continued - noSuchMethod(_) => null; //# 13: ok - method13(); //# 13: continued + noSuchMethod(_) => null; /// 13: ok + method13(); /// 13: continued } class Class2 extends B { diff --git a/tests/language/override_method_with_field_test.dart b/tests/language/override_method_with_field_test.dart index 0a79bde1386..777fe921e24 100644 --- a/tests/language/override_method_with_field_test.dart +++ b/tests/language/override_method_with_field_test.dart @@ -15,7 +15,7 @@ class Super { class Sub extends Super { Sub() : super(); - var instanceMethod = 87; // //# 01: compile-time error + var instanceMethod = 87; // /// 01: compile-time error superInstanceMethod() => super.instanceMethod(); } @@ -26,6 +26,6 @@ main() { Sub sub = s; print(s.instanceMethod); Expect.equals(42, s.superInstanceMethod()); - Expect.equals(42, sup.superInstanceMethod()); //# 02: static type warning + Expect.equals(42, sup.superInstanceMethod()); /// 02: static type warning Expect.equals(42, sub.superInstanceMethod()); } diff --git a/tests/language/parameter_default_test.dart b/tests/language/parameter_default_test.dart index 6a00febd817..9f279bbc55e 100644 --- a/tests/language/parameter_default_test.dart +++ b/tests/language/parameter_default_test.dart @@ -4,25 +4,25 @@ class C { foo(a - : 1 // //# 01: compile-time error - = 1 // //# 02: compile-time error + : 1 // /// 01: compile-time error + = 1 // /// 02: compile-time error ) { print(a); } static bar(a - : 1 // //# 03: compile-time error - = 1 // //# 04: compile-time error + : 1 // /// 03: compile-time error + = 1 // /// 04: compile-time error ) { print(a); } } baz(a - : 1 // //# 05: compile-time error - = 1 // //# 06: compile-time error + : 1 // /// 05: compile-time error + = 1 // /// 06: compile-time error ) { print(a); } main() { foo(a - : 1 // //# 07: compile-time error - = 1 // //# 08: compile-time error + : 1 // /// 07: compile-time error + = 1 // /// 08: compile-time error ) { print(a); } foo(1); diff --git a/tests/language/parameter_metadata_test.dart b/tests/language/parameter_metadata_test.dart index 8017e632410..65aed8c1cbc 100644 --- a/tests/language/parameter_metadata_test.dart +++ b/tests/language/parameter_metadata_test.dart @@ -5,13 +5,13 @@ // Test that metadata annotations can be handled on nested parameters. test( - @deprecated // //# 01: ok + @deprecated // /// 01: ok f( - @deprecated // //# 02: ok + @deprecated // /// 02: ok a, - @deprecated // //# 03: ok + @deprecated // /// 03: ok g( - @deprecated //# 04: ok + @deprecated /// 04: ok b))) {} main() { diff --git a/tests/language/positional_parameters_type_test.dart b/tests/language/positional_parameters_type_test.dart index e80996fa0d3..1db52858896 100644 --- a/tests/language/positional_parameters_type_test.dart +++ b/tests/language/positional_parameters_type_test.dart @@ -18,6 +18,6 @@ main() { anyFunction = funNumOptBoolX; acceptFunNumOptBool(funNumOptBool); acceptFunNumOptBool(funNumOptBoolX); - acceptFunNumOptBool(funNum); // //# 01: runtime error - acceptFunNumOptBool(funNumBool); // //# 02: static type warning, runtime error + acceptFunNumOptBool(funNum); // /// 01: runtime error + acceptFunNumOptBool(funNumBool); // /// 02: static type warning, runtime error } diff --git a/tests/language/prefix22_test.dart b/tests/language/prefix22_test.dart index 22d9e64ec63..96c1d867e2a 100644 --- a/tests/language/prefix22_test.dart +++ b/tests/language/prefix22_test.dart @@ -9,7 +9,7 @@ library Prefix21NegativeTest.dart; import "library12.dart" as lib12; class myClass { - myClass(lib12.Library13 p) { // //# static type warning + myClass(lib12.Library13 p) { // /// static type warning } } diff --git a/tests/language/prefix23_test.dart b/tests/language/prefix23_test.dart index 72465f0cc3d..167ba594bc3 100644 --- a/tests/language/prefix23_test.dart +++ b/tests/language/prefix23_test.dart @@ -9,7 +9,7 @@ library Prefix23Test.dart; import "library12.dart" as lib12; class myClass { - lib12.Library13 fld; // //# static type warning + lib12.Library13 fld; // /// static type warning } main() { diff --git a/tests/language/prefix_assignment_test.dart b/tests/language/prefix_assignment_test.dart index 14e6f51a0f0..b473fc2014b 100644 --- a/tests/language/prefix_assignment_test.dart +++ b/tests/language/prefix_assignment_test.dart @@ -16,11 +16,11 @@ class Base { class Derived extends Base { void f() { - p = 1; //# 01: compile-time error + p = 1; /// 01: compile-time error } } main() { new Derived().f(); - p = 1; //# 02: compile-time error + p = 1; /// 02: compile-time error } diff --git a/tests/language/prefix_identifier_reference_test.dart b/tests/language/prefix_identifier_reference_test.dart index e59b6fea630..47b169e49c8 100644 --- a/tests/language/prefix_identifier_reference_test.dart +++ b/tests/language/prefix_identifier_reference_test.dart @@ -17,9 +17,9 @@ import "empty_library.dart" as p; void f(x) {} main() { - f(p); // //# 01: compile-time error - var x = p; // //# 02: compile-time error - var x = p[0]; //# 03: compile-time error - p[0] = null; // //# 04: compile-time error - p += 0; // //# 05: compile-time error + f(p); // /// 01: compile-time error + var x = p; // /// 02: compile-time error + var x = p[0]; /// 03: compile-time error + p[0] = null; // /// 04: compile-time error + p += 0; // /// 05: compile-time error } diff --git a/tests/language/prefix_unqualified_invocation_test.dart b/tests/language/prefix_unqualified_invocation_test.dart index d4a174c6d98..020ca3e5319 100644 --- a/tests/language/prefix_unqualified_invocation_test.dart +++ b/tests/language/prefix_unqualified_invocation_test.dart @@ -19,11 +19,11 @@ class Base { class Derived extends Base { void f() { - p(); //# 01: compile-time error + p(); /// 01: compile-time error } } main() { new Derived().f(); - p(); //# 02: compile-time error + p(); /// 02: compile-time error } diff --git a/tests/language/private_access_test.dart b/tests/language/private_access_test.dart index 984fdbac920..ff608671305 100644 --- a/tests/language/private_access_test.dart +++ b/tests/language/private_access_test.dart @@ -8,14 +8,14 @@ import 'private_access_lib.dart'; import 'private_access_lib.dart' as private; main() { - Expect.throws(() => _function(), // //# 01: static type warning - (e) => e is NoSuchMethodError); // //# 01: continued - Expect.throws(() => private._function(), // //# 02: static type warning - (e) => e is NoSuchMethodError); // //# 02: continued - Expect.throws(() => new _Class()); // //# 03: static type warning - Expect.throws(() => new private._Class()); // //# 04: static type warning - Expect.throws(() => new Class._constructor(), // //# 05: static type warning - (e) => e is NoSuchMethodError); // //# 05: continued - Expect.throws(() => new private.Class._constructor(), //# 06: static type warning - (e) => e is NoSuchMethodError); // //# 06: continued + Expect.throws(() => _function(), // /// 01: static type warning + (e) => e is NoSuchMethodError); // /// 01: continued + Expect.throws(() => private._function(), // /// 02: static type warning + (e) => e is NoSuchMethodError); // /// 02: continued + Expect.throws(() => new _Class()); // /// 03: static type warning + Expect.throws(() => new private._Class()); // /// 04: static type warning + Expect.throws(() => new Class._constructor(), // /// 05: static type warning + (e) => e is NoSuchMethodError); // /// 05: continued + Expect.throws(() => new private.Class._constructor(), /// 06: static type warning + (e) => e is NoSuchMethodError); // /// 06: continued } \ No newline at end of file diff --git a/tests/language/private_super_constructor_test.dart b/tests/language/private_super_constructor_test.dart index 24b0b1d318d..a203f4aba66 100644 --- a/tests/language/private_super_constructor_test.dart +++ b/tests/language/private_super_constructor_test.dart @@ -7,7 +7,7 @@ library private_super_constructor_test; import 'private_super_constructor_lib.dart'; class C extends B { - C() : super._foo(); //# 01: compile-time error + C() : super._foo(); /// 01: compile-time error } main() => new C(); \ No newline at end of file diff --git a/tests/language/proxy2_test.dart b/tests/language/proxy2_test.dart index 4341c4d8844..485f26e8d62 100644 --- a/tests/language/proxy2_test.dart +++ b/tests/language/proxy2_test.dart @@ -19,9 +19,9 @@ class WrongProxy {} class PrefixProxy {} main() { - try { new WrongProxy().foo; } catch (e) {} // //# 01: static type warning - try { new WrongProxy().foo(); } catch (e) {} // //# 02: static type warning + try { new WrongProxy().foo; } catch (e) {} // /// 01: static type warning + try { new WrongProxy().foo(); } catch (e) {} // /// 02: static type warning - try { new PrefixProxy().foo; } catch (e) {} //# 03: ok - try { new PrefixProxy().foo(); } catch (e) {} //# 04: ok + try { new PrefixProxy().foo; } catch (e) {} /// 03: ok + try { new PrefixProxy().foo(); } catch (e) {} /// 04: ok } diff --git a/tests/language/proxy3_test.dart b/tests/language/proxy3_test.dart index 5c90fd0a6d1..9a538689dc5 100644 --- a/tests/language/proxy3_test.dart +++ b/tests/language/proxy3_test.dart @@ -16,9 +16,9 @@ class ValidProxy {} class InvalidProxy {} main() { - try { new InvalidProxy().foo; } catch (e) {} // //# 01: static type warning - try { new InvalidProxy().foo(); } catch (e) {} // //# 02: static type warning + try { new InvalidProxy().foo; } catch (e) {} // /// 01: static type warning + try { new InvalidProxy().foo(); } catch (e) {} // /// 02: static type warning - try { new ValidProxy().foo; } catch (e) {} //# 03: ok - try { new ValidProxy().foo(); } catch (e) {} //# 04: ok + try { new ValidProxy().foo; } catch (e) {} /// 03: ok + try { new ValidProxy().foo(); } catch (e) {} /// 04: ok } diff --git a/tests/language/redirecting_factory_default_values_test.dart b/tests/language/redirecting_factory_default_values_test.dart index b2fee51201d..152d2c73c50 100644 --- a/tests/language/redirecting_factory_default_values_test.dart +++ b/tests/language/redirecting_factory_default_values_test.dart @@ -9,8 +9,8 @@ import "package:expect/expect.dart"; class A { A(this.a, [this.b = 0]); factory A.f(a) = A; - factory A.g(a, [b = 0]) = A; // //# 01: compile-time error - factory A.h(a, {b: 0}) = A; // //# 02: compile-time error + factory A.g(a, [b = 0]) = A; // /// 01: compile-time error + factory A.h(a, {b: 0}) = A; // /// 02: compile-time error int a; int b; diff --git a/tests/language/redirecting_factory_infinite_steps_test.dart b/tests/language/redirecting_factory_infinite_steps_test.dart index cc22535d92c..e6550801e57 100644 --- a/tests/language/redirecting_factory_infinite_steps_test.dart +++ b/tests/language/redirecting_factory_infinite_steps_test.dart @@ -13,11 +13,11 @@ // indirectly via a sequence of redirections." class Foo extends Bar { - factory Foo() = Bar; //# 01: static type warning, dynamic type error + factory Foo() = Bar; /// 01: static type warning, dynamic type error } class Bar { - factory Bar() = Foo; //# 02: compile-time error + factory Bar() = Foo; /// 02: compile-time error } main() { diff --git a/tests/language/redirecting_factory_malbounded_test.dart b/tests/language/redirecting_factory_malbounded_test.dart index 90ca684f581..83da0674b6c 100644 --- a/tests/language/redirecting_factory_malbounded_test.dart +++ b/tests/language/redirecting_factory_malbounded_test.dart @@ -10,7 +10,7 @@ class Foo extends Bar { } class Bar { factory Bar() { return new Foo.create(); diff --git a/tests/language/ref_before_declaration_test.dart b/tests/language/ref_before_declaration_test.dart index 9a6c2b556cd..677f6bee2a5 100644 --- a/tests/language/ref_before_declaration_test.dart +++ b/tests/language/ref_before_declaration_test.dart @@ -18,7 +18,7 @@ class C { void test1() { use(f); // Refers to instance field f. - var f = 'A shut mouth gathers no foot.'; // //# 00: compile-time error + var f = 'A shut mouth gathers no foot.'; // /// 00: compile-time error } void test2() { @@ -26,7 +26,7 @@ class C { use(f); // Refers to instance field f. } - var f = 'When chemists die, they barium.'; // //# 01: compile-time error + var f = 'When chemists die, they barium.'; // /// 01: compile-time error if (true) { var f = 1; // ok, shadows outer f and instance field f. } @@ -37,19 +37,19 @@ class C { use(x); // Refers to top-level x. use(y); // Refers to top-level y. } - final x = "I have not yet begun to procrastinate."; // //# 02: compile-time error - const y = "Honk if you like peace and quiet!"; // //# 03: compile-time error + final x = "I have not yet begun to procrastinate."; // /// 02: compile-time error + const y = "Honk if you like peace and quiet!"; // /// 03: compile-time error } void test4() { void Q() { P(); // Refers to non-existing top-level function P } - void P() { // //# 06: compile-time error - Q(); // //# 06: continued - } // //# 06: continued + void P() { // /// 06: compile-time error + Q(); // /// 06: continued + } // /// 06: continued - Function f = () {x = f;}; // //# 07: compile-time error + Function f = () {x = f;}; // /// 07: compile-time error } test() { @@ -62,12 +62,12 @@ class C { void testTypeRef() { String s = 'Can vegetarians eat animal crackers?'; - var String = "I distinctly remember forgetting that."; // //# 04: compile-time error + var String = "I distinctly remember forgetting that."; // /// 04: compile-time error } void testLibPrefix() { var pie = math.PI; - final math = 0; // //# 05: compile-time error + final math = 0; // /// 05: compile-time error } diff --git a/tests/language/regress_19413_test.dart b/tests/language/regress_19413_test.dart index d166af17891..84ff0996053 100644 --- a/tests/language/regress_19413_test.dart +++ b/tests/language/regress_19413_test.dart @@ -8,5 +8,5 @@ import 'regress_19413_foo.dart' as foo; import 'regress_19413_bar.dart' as foo; main() { - foo.f(); //# 01: static type warning, runtime error + foo.f(); /// 01: static type warning, runtime error } \ No newline at end of file diff --git a/tests/language/regress_20394_test.dart b/tests/language/regress_20394_test.dart index 1cf77fafaac..4621ea1f930 100644 --- a/tests/language/regress_20394_test.dart +++ b/tests/language/regress_20394_test.dart @@ -3,7 +3,7 @@ import 'regress_20394_lib.dart'; class M {} class C extends Super with M { - C() : super._private(42); // //# 01: compile-time error + C() : super._private(42); // /// 01: compile-time error } main() { diff --git a/tests/language/regress_21793_test.dart b/tests/language/regress_21793_test.dart index 623f7f71ffc..2ca0c5fe42d 100644 --- a/tests/language/regress_21793_test.dart +++ b/tests/language/regress_21793_test.dart @@ -6,9 +6,9 @@ import 'package:expect/expect.dart'; -/* // //# 01: static type warning, runtime error +/* // /// 01: static type warning, runtime error class A { call(x) => x; } -*/ // //# 01: continued +*/ // /// 01: continued main() { print(new A()(499)); diff --git a/tests/language/regress_21912_test.dart b/tests/language/regress_21912_test.dart index 84817e3f436..8a7151bcf0c 100644 --- a/tests/language/regress_21912_test.dart +++ b/tests/language/regress_21912_test.dart @@ -16,7 +16,7 @@ void main() { Function2, Function2> t1; Function2 t2; Function2, Function2> left; - left = t1; //# 01: static type warning - left = t2; //# 02: static type warning + left = t1; /// 01: static type warning + left = t2; /// 02: static type warning } } diff --git a/tests/language/regress_22936_test.dart b/tests/language/regress_22936_test.dart index 3b3ac4c899f..1239947a3ca 100644 --- a/tests/language/regress_22936_test.dart +++ b/tests/language/regress_22936_test.dart @@ -16,7 +16,7 @@ foo() { main() { final x = null; try { - x = // //# 01: static type warning + x = // /// 01: static type warning foo(); } on NoSuchMethodError { } diff --git a/tests/language/regress_22976_test.dart b/tests/language/regress_22976_test.dart index e6e7da612e5..ea29319e8c0 100644 --- a/tests/language/regress_22976_test.dart +++ b/tests/language/regress_22976_test.dart @@ -11,6 +11,6 @@ class C implements B, A {} main() { C c1 = new C(); C c2 = new C(); - A a0 = c1; //# 01: ok - A a1 = c2; //# 02: ok + A a0 = c1; /// 01: ok + A a1 = c2; /// 02: ok } diff --git a/tests/language/regress_23038_test.dart b/tests/language/regress_23038_test.dart index 8c5b9c2f72b..643ca7853d1 100644 --- a/tests/language/regress_23038_test.dart +++ b/tests/language/regress_23038_test.dart @@ -4,9 +4,9 @@ class C { const - factory //# 01: compile-time error + factory /// 01: compile-time error C() - = C> //# 01: continued + = C> /// 01: continued ; } diff --git a/tests/language/regress_23051_test.dart b/tests/language/regress_23051_test.dart index 24a29886b48..1807764cd8c 100644 --- a/tests/language/regress_23051_test.dart +++ b/tests/language/regress_23051_test.dart @@ -5,11 +5,11 @@ // Regression test for issue 23051. main() { - new A(); // //# 01: compile-time error + new A(); // /// 01: compile-time error } -class A { // //# 01: continued - // Note the trailing ' in the next line. //# 01: continued - get foo => bar();' // //# 01: continued - // //# 01: continued - String bar( // //# 01: continued \ No newline at end of file +class A { // /// 01: continued + // Note the trailing ' in the next line. /// 01: continued + get foo => bar();' // /// 01: continued + // /// 01: continued + String bar( // /// 01: continued \ No newline at end of file diff --git a/tests/language/regress_23500_test.dart b/tests/language/regress_23500_test.dart index af867c2e77e..bd183f93237 100644 --- a/tests/language/regress_23500_test.dart +++ b/tests/language/regress_23500_test.dart @@ -8,8 +8,8 @@ import "package:expect/expect.dart"; foo() async { try { try { - await for (var c in new Stream.fromIterable([])) {} // //# 01: ok - await 0; // //# 02: ok + await for (var c in new Stream.fromIterable([])) {} // /// 01: ok + await 0; // /// 02: ok } catch (error) { } } catch (error) { diff --git a/tests/language/regress_24935_test.dart b/tests/language/regress_24935_test.dart index 22ead9e491f..53f6f491cbe 100644 --- a/tests/language/regress_24935_test.dart +++ b/tests/language/regress_24935_test.dart @@ -18,7 +18,7 @@ Future main() async { // after breaking out of the innermost loop does not // crash the VM. In other words, the expected test // outcome is an unhandled exception. - throw "ball"; //# 01: runtime error + throw "ball"; /// 01: runtime error } diff --git a/tests/language/regress_26855_test.dart b/tests/language/regress_26855_test.dart index 5fa520857d6..4e879b1a213 100644 --- a/tests/language/regress_26855_test.dart +++ b/tests/language/regress_26855_test.dart @@ -2,25 +2,25 @@ // 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. -void f0(this.x) {} // //# 0: compile-time error +void f0(this.x) {} // /// 0: compile-time error -void f1(int g(this.x)) {} // //# 1: compile-time error +void f1(int g(this.x)) {} // /// 1: compile-time error -void f2(int g(int this.x)) {} // //# 2: compile-time error +void f2(int g(int this.x)) {} // /// 2: compile-time error class C { C(); var x; - void f3(int g(this.x)) {} // //# 3: compile-time error - C.f4(int g(this.x)); // //# 4: compile-time error + void f3(int g(this.x)) {} // /// 3: compile-time error + C.f4(int g(this.x)); // /// 4: compile-time error } main() { - f0(null); // //# 0: continued - f1(null); // //# 1: continued - f2(null); // //# 2: continued + f0(null); // /// 0: continued + f1(null); // /// 1: continued + f2(null); // /// 2: continued C c = new C(); - c.f3(null); // //# 3: continued - new C.f4(null); // //# 4: continued + c.f3(null); // /// 3: continued + new C.f4(null); // /// 4: continued } diff --git a/tests/language/regress_27617_test.dart b/tests/language/regress_27617_test.dart index c5f6c637b27..f584b44f9a2 100644 --- a/tests/language/regress_27617_test.dart +++ b/tests/language/regress_27617_test.dart @@ -8,9 +8,9 @@ class Foo { Foo._(this.greeting) { } // Const constructor must not redirect to non-const constructor. - const Foo.hi() : this._('hi'); // //# 1: compile-time error + const Foo.hi() : this._('hi'); // /// 1: compile-time error } main() { - const h = const Foo.hi(); // //# 1: continued + const h = const Foo.hi(); // /// 1: continued } diff --git a/tests/language/regress_28217_test.dart b/tests/language/regress_28217_test.dart index 0e55515a6fc..3cc40089731 100644 --- a/tests/language/regress_28217_test.dart +++ b/tests/language/regress_28217_test.dart @@ -6,9 +6,9 @@ // redirecting to a factory constructor. class B { - B() : this.a(); // //# none: compile-time error - factory B.a() { } // //# 01: compile-time error - B.a(); // //# 02: ok + B() : this.a(); // /// none: compile-time error + factory B.a() { } // /// 01: compile-time error + B.a(); // /// 02: ok } main() => new B(); diff --git a/tests/language/reify_typevar_static_test.dart b/tests/language/reify_typevar_static_test.dart index 8c547a44f36..fb9bf9acb3a 100644 --- a/tests/language/reify_typevar_static_test.dart +++ b/tests/language/reify_typevar_static_test.dart @@ -9,16 +9,16 @@ class C { C([this.x]); static staticFunction(bool b) => - b ? T : // //# 00: compile-time error + b ? T : // /// 00: compile-time error null; factory C.factoryConstructor(bool b) => new C( - b ? T : // //# 01: ok + b ? T : // /// 01: ok null); C.redirectingConstructor(bool b) : this( - b ? T : // //# 02: ok + b ? T : // /// 02: ok null); C.ordinaryConstructor(bool b) : x = - b ? T : // //# 03: ok + b ? T : // /// 03: ok null; } diff --git a/tests/language/rewrite_implicit_this_test.dart b/tests/language/rewrite_implicit_this_test.dart index f4e24d24333..5d816696539 100644 --- a/tests/language/rewrite_implicit_this_test.dart +++ b/tests/language/rewrite_implicit_this_test.dart @@ -10,30 +10,30 @@ class Foo { String x = 'x'; easy(z) { - return x + y + z; //# 01: static type warning + return x + y + z; /// 01: static type warning } // Shadow the 'y' field in various ways shadow_y_parameter(y) { - return x + this.y + y; //# 01: continued + return x + this.y + y; /// 01: continued } shadow_y_local(z) { var y = z; - return x + this.y + y; //# 01: continued + return x + this.y + y; /// 01: continued } shadow_y_capturedLocal(z) { var y = z; foo() { - return x + this.y + y; //# 01: continued + return x + this.y + y; /// 01: continued } return foo(); } shadow_y_closureParam(z) { foo(y) { - return x + this.y + y; //# 01: continued + return x + this.y + y; /// 01: continued } return foo(z); } @@ -41,32 +41,32 @@ class Foo { shadow_y_localInsideClosure(z) { foo() { var y = z; - return x + this.y + y; //# 01: continued + return x + this.y + y; /// 01: continued } return foo(); } // Shadow the 'x' field in various ways shadow_x_parameter(x) { - return this.x + y + x; //# 01: continued + return this.x + y + x; /// 01: continued } shadow_x_local(z) { var x = z; - return this.x + y + x; //# 01: continued + return this.x + y + x; /// 01: continued } shadow_x_capturedLocal(z) { var x = z; foo() { - return this.x + y + x; //# 01: continued + return this.x + y + x; /// 01: continued } return foo(); } shadow_x_closureParam(z) { foo(x) { - return this.x + y + x; //# 01: continued + return this.x + y + x; /// 01: continued } return foo(z); } @@ -74,13 +74,13 @@ class Foo { shadow_x_localInsideClosure(z) { foo() { var x = z; - return this.x + y + x; //# 01: continued + return this.x + y + x; /// 01: continued } return foo(); } shadow_x_toplevel() { - return x + this.y + toplevel + this.toplevel; //# 01: continued + return x + this.y + toplevel + this.toplevel; /// 01: continued } } @@ -91,17 +91,17 @@ class Sub extends Foo { } main() { - Expect.equals('xyz', new Sub().easy('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_y_parameter('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_y_local('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_y_capturedLocal('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_y_closureParam('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_y_localInsideClosure('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_x_parameter('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_x_local('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_x_capturedLocal('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_x_closureParam('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_x_localInsideClosure('z')); //# 01: continued + Expect.equals('xyz', new Sub().easy('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_y_parameter('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_y_local('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_y_capturedLocal('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_y_closureParam('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_y_localInsideClosure('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_x_parameter('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_x_local('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_x_capturedLocal('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_x_closureParam('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_x_localInsideClosure('z')); /// 01: continued - Expect.equals('xyAB', new Sub().shadow_x_toplevel()); //# 01: continued + Expect.equals('xyAB', new Sub().shadow_x_toplevel()); /// 01: continued } diff --git a/tests/language/scope_variable_test.dart b/tests/language/scope_variable_test.dart index d731cdf6586..04801ca8852 100644 --- a/tests/language/scope_variable_test.dart +++ b/tests/language/scope_variable_test.dart @@ -35,7 +35,7 @@ int testShadowingAfterUse() { var c = a; // Use of 'a' prior to its shadow declaration below. var d = b + c; // Shadow declaration of 'a'. - var a = 5; // //# 01: compile-time error + var a = 5; // /// 01: compile-time error return d + a; } } diff --git a/tests/language/setter3_test.dart b/tests/language/setter3_test.dart index 9033421d6ef..3253a6e27ca 100644 --- a/tests/language/setter3_test.dart +++ b/tests/language/setter3_test.dart @@ -9,8 +9,8 @@ class A { set foo(x) {} void set bar(x) {} - dynamic set baz(x) {} //# 01: static type warning - bool set bob(x) {} //# 02: static type warning + dynamic set baz(x) {} /// 01: static type warning + bool set bob(x) {} /// 02: static type warning } main() { diff --git a/tests/language/setter_no_getter_call_test.dart b/tests/language/setter_no_getter_call_test.dart index 5ba2bb931b7..a7d577ef9a6 100644 --- a/tests/language/setter_no_getter_call_test.dart +++ b/tests/language/setter_no_getter_call_test.dart @@ -6,9 +6,9 @@ import "package:expect/expect.dart"; var topLevelClosure; -/* // //# 01: runtime error +/* // /// 01: runtime error get topLevel => topLevelClosure; -*/ // //# 01: continued +*/ // /// 01: continued set topLevel(var value) { } initialize() { diff --git a/tests/language/setter_no_getter_test.dart b/tests/language/setter_no_getter_test.dart index c538238e659..00fb081bc43 100644 --- a/tests/language/setter_no_getter_test.dart +++ b/tests/language/setter_no_getter_test.dart @@ -4,11 +4,11 @@ import "package:expect/expect.dart"; -/* // //# 01: runtime error +/* // /// 01: runtime error get topLevel => 42; -*/ // //# 01: continued +*/ // /// 01: continued set topLevel(var value) { } main() { - Expect.equals(42, topLevel++); //# 01: continued + Expect.equals(42, topLevel++); /// 01: continued } diff --git a/tests/language/setter_override2_test.dart b/tests/language/setter_override2_test.dart index f821e402ef9..03e6e04bda6 100644 --- a/tests/language/setter_override2_test.dart +++ b/tests/language/setter_override2_test.dart @@ -9,10 +9,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: ok - get foo => 42; // //# 01: ok - foo() => 42; // //# 02: ok - set foo(value) { } // //# 03: ok + var foo = 42; // /// 00: ok + get foo => 42; // /// 01: ok + foo() => 42; // /// 02: ok + set foo(value) { } // /// 03: ok } class B extends A { diff --git a/tests/language/setter_override_test.dart b/tests/language/setter_override_test.dart index cffd1d925a4..4b4d868b4a3 100644 --- a/tests/language/setter_override_test.dart +++ b/tests/language/setter_override_test.dart @@ -10,10 +10,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: static type warning - foo() => 42; // //# 02: static type warning - set foo(value) { } // //# 03: compile-time error + var foo = 42; // /// 00: compile-time error + get foo => 42; // /// 01: static type warning + foo() => 42; // /// 02: static type warning + set foo(value) { } // /// 03: compile-time error } class B extends A { diff --git a/tests/language/stacktrace_rethrow_error_test.dart b/tests/language/stacktrace_rethrow_error_test.dart index e4e2c6f9040..b7c7fb2c4e4 100644 --- a/tests/language/stacktrace_rethrow_error_test.dart +++ b/tests/language/stacktrace_rethrow_error_test.dart @@ -13,10 +13,10 @@ aa1() { bb1(); fail(); } catch(error - , stacktrace // //# withtraceparameter: ok + , stacktrace // /// withtraceparameter: ok ) { expectTrace(['gg1', 'ff1', 'ee1', 'dd1', 'cc1', 'bb1', 'aa1'], error.stackTrace); - expectTrace(['gg1', 'ff1', 'ee1', 'dd1', 'cc1', 'bb1', 'aa1'], stacktrace); // //# withtraceparameter: continued + expectTrace(['gg1', 'ff1', 'ee1', 'dd1', 'cc1', 'bb1', 'aa1'], stacktrace); // /// withtraceparameter: continued } } @@ -53,10 +53,10 @@ aa2() { bb2(); fail(); } catch(error - , stacktrace // //# withtraceparameter: continued + , stacktrace // /// withtraceparameter: continued ) { expectTrace(['gg2', 'ff2', 'ee2', 'dd2', 'cc2', 'bb2', 'aa2'], error.stackTrace); - expectTrace(['gg2', 'ff2', 'ee2', 'dd2', 'cc2', 'bb2', 'aa2'], stacktrace); // //# withtraceparameter: continued + expectTrace(['gg2', 'ff2', 'ee2', 'dd2', 'cc2', 'bb2', 'aa2'], stacktrace); // /// withtraceparameter: continued } } @@ -93,10 +93,10 @@ aa3() { bb3(); fail(); } catch(error - , stacktrace // //# withtraceparameter: continued + , stacktrace // /// withtraceparameter: continued ) { expectTrace(['gg3', 'ff3', 'ee3', 'dd3', 'cc3', 'bb3', 'aa3'], error.stackTrace); - expectTrace(['cc3', 'bb3', 'aa3'], stacktrace); // //# withtraceparameter: continued + expectTrace(['cc3', 'bb3', 'aa3'], stacktrace); // /// withtraceparameter: continued } } diff --git a/tests/language/static_field3_test.dart b/tests/language/static_field3_test.dart index 7e4969398d4..079a1732092 100644 --- a/tests/language/static_field3_test.dart +++ b/tests/language/static_field3_test.dart @@ -11,9 +11,9 @@ class Foo { main() { if (false) { - var x = Foo.x; // //# 01: static type warning - var m = Foo.m; // //# 02: static type warning - Foo.m = 1; // //# 03: static type warning - Foo.x = 1; // //# 04: static type warning + var x = Foo.x; // /// 01: static type warning + var m = Foo.m; // /// 02: static type warning + Foo.m = 1; // /// 03: static type warning + Foo.x = 1; // /// 04: static type warning } } diff --git a/tests/language/static_field_test.dart b/tests/language/static_field_test.dart index ae245962500..d7aa5734560 100644 --- a/tests/language/static_field_test.dart +++ b/tests/language/static_field_test.dart @@ -65,7 +65,7 @@ class StaticFieldTest { class StaticField1RunNegativeTest { - static // //# 01: static type warning, runtime error + static // /// 01: static type warning, runtime error var x; testMain() { var foo = new StaticField1RunNegativeTest(); @@ -75,7 +75,7 @@ class StaticField1RunNegativeTest { } class StaticField1aRunNegativeTest { - static // //# 02: static type warning, runtime error + static // /// 02: static type warning, runtime error void m() {} testMain() { @@ -86,7 +86,7 @@ class StaticField1aRunNegativeTest { } class StaticField2RunNegativeTest { - static //# 03: static type warning, runtime error + static /// 03: static type warning, runtime error var x; testMain() { @@ -97,13 +97,13 @@ class StaticField2RunNegativeTest { } class StaticField2aRunNegativeTest { - static // //# 04: static type warning, runtime error + static // /// 04: static type warning, runtime error void m() {} testMain() { var foo = new StaticField2aRunNegativeTest(); print(m); // Used to compile 'm' and force any errors. - foo.m = 1; //# 04:continued + foo.m = 1; /// 04:continued } } diff --git a/tests/language/static_final_field2_test.dart b/tests/language/static_final_field2_test.dart index 8a148267b7a..82e281e7957 100644 --- a/tests/language/static_final_field2_test.dart +++ b/tests/language/static_final_field2_test.dart @@ -10,13 +10,13 @@ class A { class B { const B() : n = 5; final n; - static const a; // //# 02: compile-time error + static const a; // /// 02: compile-time error static const b = 3 + 5; } main() { - A.x = 2; // //# 01: static type warning, runtime error + A.x = 2; // /// 01: static type warning, runtime error new B(); print(B.b); - print(B.a); // //# 02: continued + print(B.a); // /// 02: continued } diff --git a/tests/language/static_getter_no_setter1_test.dart b/tests/language/static_getter_no_setter1_test.dart index 44d266d307c..431bbdc2a6c 100644 --- a/tests/language/static_getter_no_setter1_test.dart +++ b/tests/language/static_getter_no_setter1_test.dart @@ -13,12 +13,12 @@ class Class { method() { try { - getter++; //# 01: static type warning + getter++; /// 01: static type warning } on NoSuchMethodError catch(e) { - Expect.isTrue(getter_visited); //# 01: continued + Expect.isTrue(getter_visited); /// 01: continued return; } - Expect.fail('Expected NoSuchMethodError'); //# 01: continued + Expect.fail('Expected NoSuchMethodError'); /// 01: continued } } diff --git a/tests/language/static_getter_no_setter2_test.dart b/tests/language/static_getter_no_setter2_test.dart index 2bbfe624130..508f175bead 100644 --- a/tests/language/static_getter_no_setter2_test.dart +++ b/tests/language/static_getter_no_setter2_test.dart @@ -9,11 +9,11 @@ class Class { method() { try { - getter++; //# 01: static type warning + getter++; /// 01: static type warning } on NoSuchMethodError catch(e) { return; } - Expect.fail('Expected NoSuchMethodError'); //# 01: continued + Expect.fail('Expected NoSuchMethodError'); /// 01: continued } noSuchMethod(i) { @@ -23,7 +23,7 @@ class Class { class Subclass extends Class { method() { - print(getter); //# 01: continued + print(getter); /// 01: continued super.method(); } } diff --git a/tests/language/static_getter_no_setter3_test.dart b/tests/language/static_getter_no_setter3_test.dart index 450cb61573e..c466e7dc7cd 100644 --- a/tests/language/static_getter_no_setter3_test.dart +++ b/tests/language/static_getter_no_setter3_test.dart @@ -13,12 +13,12 @@ class Class { method() { try { - getter++; //# 01: static type warning + getter++; /// 01: static type warning } on NoSuchMethodError catch(e) { - Expect.isTrue(getter_visited); //# 01: continued + Expect.isTrue(getter_visited); /// 01: continued return; } - Expect.fail('Expected NoSuchMethodError'); //# 01: continued + Expect.fail('Expected NoSuchMethodError'); /// 01: continued } } diff --git a/tests/language/static_parameter_test.dart b/tests/language/static_parameter_test.dart index 437883f698b..0f91a71d425 100644 --- a/tests/language/static_parameter_test.dart +++ b/tests/language/static_parameter_test.dart @@ -3,48 +3,48 @@ // BSD-style license that can be found in the LICENSE file. foo(x - , static int y // //# 01: compile-time error - , final static y // //# 02: compile-time error - , {static y} // //# 03: compile-time error - , [static y] // //# 04: compile-time error + , static int y // /// 01: compile-time error + , final static y // /// 02: compile-time error + , {static y} // /// 03: compile-time error + , [static y] // /// 04: compile-time error ) { } class C { bar(x - , static int y // //# 05: compile-time error - , final static y // //# 06: compile-time error - , {static y} // //# 07: compile-time error - , [static y] // //# 08: compile-time error + , static int y // /// 05: compile-time error + , final static y // /// 06: compile-time error + , {static y} // /// 07: compile-time error + , [static y] // /// 08: compile-time error ) { } static baz(x - , static int y // //# 09: compile-time error - , final static y // //# 10: compile-time error - , {static y} // //# 11: compile-time error - , [static y] // //# 12: compile-time error + , static int y // /// 09: compile-time error + , final static y // /// 10: compile-time error + , {static y} // /// 11: compile-time error + , [static y] // /// 12: compile-time error ) { } } main() { foo(1 - , 1 // //# 01: continued - , 1 // //# 02: continued - , y: 1 // //# 03: continued - , 1 // //# 04: continued + , 1 // /// 01: continued + , 1 // /// 02: continued + , y: 1 // /// 03: continued + , 1 // /// 04: continued ); new C().bar(1 - , 1 // //# 05: continued - , 1 // //# 06: continued - , y: 1 // //# 07: continued - , 1 // //# 08: continued + , 1 // /// 05: continued + , 1 // /// 06: continued + , y: 1 // /// 07: continued + , 1 // /// 08: continued ); C.baz(1 - , 1 // //# 09: continued - , 1 // //# 10: continued - , y: 1 // //# 11: continued - , 1 // //# 12: continued + , 1 // /// 09: continued + , 1 // /// 10: continued + , y: 1 // /// 11: continued + , 1 // /// 12: continued ); } diff --git a/tests/language/static_setter_get_test.dart b/tests/language/static_setter_get_test.dart index 1680a2d3c44..a10c1d92059 100644 --- a/tests/language/static_setter_get_test.dart +++ b/tests/language/static_setter_get_test.dart @@ -6,10 +6,10 @@ import 'package:expect/expect.dart'; class Class { static set o(_) {} - m() => o; //# 01: static type warning + m() => o; /// 01: static type warning noSuchMethod(_) => 42; } main() { - Expect.throws(() => new Class().m()); //# 01: continued + Expect.throws(() => new Class().m()); /// 01: continued } \ No newline at end of file diff --git a/tests/language/static_top_level_test.dart b/tests/language/static_top_level_test.dart index 6b0a791f275..d6e155818b9 100644 --- a/tests/language/static_top_level_test.dart +++ b/tests/language/static_top_level_test.dart @@ -2,15 +2,15 @@ // 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. -static method() { } // //# 00: compile-time error -static var field; // //# 01: compile-time error -static const finalField = 42; // //# 02: compile-time error -static const constant = 123; // //# 03: compile-time error +static method() { } // /// 00: compile-time error +static var field; // /// 01: compile-time error +static const finalField = 42; // /// 02: compile-time error +static const constant = 123; // /// 03: compile-time error -static int typedMethod() => 87; // //# 04: compile-time error -static int typedField; // //# 05: compile-time error -static const int typedFinalField = 99; //# 06: compile-time error -static const int typedConstant = 1; // //# 07: compile-time error +static int typedMethod() => 87; // /// 04: compile-time error +static int typedField; // /// 05: compile-time error +static const int typedFinalField = 99; /// 06: compile-time error +static const int typedConstant = 1; // /// 07: compile-time error void main() { } diff --git a/tests/language/string_interpolation1_test.dart b/tests/language/string_interpolation1_test.dart index dacdbca088c..4555dd07d96 100644 --- a/tests/language/string_interpolation1_test.dart +++ b/tests/language/string_interpolation1_test.dart @@ -11,9 +11,9 @@ class A { class StringInterpolation1NegativeTest { // Dollar not followed by "{" or identifier. - static const DOLLAR = const A("$"); //# 01: compile-time error + static const DOLLAR = const A("$"); /// 01: compile-time error static testMain() { - print(DOLLAR); //# 01: continued + print(DOLLAR); /// 01: continued } } diff --git a/tests/language/string_interpolation2_test.dart b/tests/language/string_interpolation2_test.dart index f54fc950814..55aa734890d 100644 --- a/tests/language/string_interpolation2_test.dart +++ b/tests/language/string_interpolation2_test.dart @@ -7,7 +7,7 @@ class StringInterpolation2NegativeTest { static testMain() { // Dollar followed by "/". - print('C;Y1;X4;K"$/Month"'); //# 01: compile-time error + print('C;Y1;X4;K"$/Month"'); /// 01: compile-time error } } diff --git a/tests/language/string_interpolation3_test.dart b/tests/language/string_interpolation3_test.dart index 59a5001882c..4ccf8d5d204 100644 --- a/tests/language/string_interpolation3_test.dart +++ b/tests/language/string_interpolation3_test.dart @@ -7,7 +7,7 @@ class StringInterpolation3NegativeTest { static testMain() { // Dollar followed by a number. - print('F;P4;F$2R'); //# 01: compile-time error + print('F;P4;F$2R'); /// 01: compile-time error } } diff --git a/tests/language/string_interpolation4_test.dart b/tests/language/string_interpolation4_test.dart index d343e432a99..ab26160735b 100644 --- a/tests/language/string_interpolation4_test.dart +++ b/tests/language/string_interpolation4_test.dart @@ -7,7 +7,7 @@ class StringInterpolation4NegativeTest { static testMain() { // Dollar not followed by "{" or identifier. - print("-" + "$" + "foo"); //# 01: compile-time error + print("-" + "$" + "foo"); /// 01: compile-time error } } diff --git a/tests/language/string_interpolation5_test.dart b/tests/language/string_interpolation5_test.dart index 50fba925337..13cf3d32526 100644 --- a/tests/language/string_interpolation5_test.dart +++ b/tests/language/string_interpolation5_test.dart @@ -7,7 +7,7 @@ class StringInterpolation5NegativeTest { static testMain() { // Dollar followed by a number. - print("$1,000"); //# 01: compile-time error + print("$1,000"); /// 01: compile-time error } } diff --git a/tests/language/string_interpolation6_test.dart b/tests/language/string_interpolation6_test.dart index 35a5b85195c..155f9fbc09f 100644 --- a/tests/language/string_interpolation6_test.dart +++ b/tests/language/string_interpolation6_test.dart @@ -8,7 +8,7 @@ class StringInterpolation6NegativeTest { static testMain() { // Dollar not followed by "{" or identifier. String regexp; - regexp = "^(\\d\\d?)[-/](\\d\\d?)$"; //# 01: compile-time error + regexp = "^(\\d\\d?)[-/](\\d\\d?)$"; /// 01: compile-time error print(regexp); } } diff --git a/tests/language/string_interpolation9_test.dart b/tests/language/string_interpolation9_test.dart index e52db05fd63..ec89d324b0e 100644 --- a/tests/language/string_interpolation9_test.dart +++ b/tests/language/string_interpolation9_test.dart @@ -7,29 +7,29 @@ main() { var x; - x = "$"; // //# 1: compile-time error - x = "x$"; // //# 2: compile-time error - x = "$x$"; // //# 3: compile-time error - x = "$$x"; // //# 4: compile-time error - x = "$ "; // //# 5: compile-time error + x = "$"; // /// 1: compile-time error + x = "x$"; // /// 2: compile-time error + x = "$x$"; // /// 3: compile-time error + x = "$$x"; // /// 4: compile-time error + x = "$ "; // /// 5: compile-time error - x = '$'; // //# 6: compile-time error - x = 'x$'; // //# 7: compile-time error - x = '$x$'; // //# 8: compile-time error - x = '$$x'; // //# 9: compile-time error - x = '$ '; // //# 10: compile-time error + x = '$'; // /// 6: compile-time error + x = 'x$'; // /// 7: compile-time error + x = '$x$'; // /// 8: compile-time error + x = '$$x'; // /// 9: compile-time error + x = '$ '; // /// 10: compile-time error - x = """$"""; // //# 11: compile-time error - x = """x$"""; // //# 12: compile-time error - x = """$x$"""; // //# 13: compile-time error - x = """$$x"""; // //# 14: compile-time error - x = """$ """; // //# 15: compile-time error + x = """$"""; // /// 11: compile-time error + x = """x$"""; // /// 12: compile-time error + x = """$x$"""; // /// 13: compile-time error + x = """$$x"""; // /// 14: compile-time error + x = """$ """; // /// 15: compile-time error - x = '''$'''; // //# 16: compile-time error - x = '''x$'''; // //# 17: compile-time error - x = '''$x$'''; // //# 18: compile-time error - x = '''$$x'''; // //# 19: compile-time error - x = '''$ '''; // //# 20: compile-time error + x = '''$'''; // /// 16: compile-time error + x = '''x$'''; // /// 17: compile-time error + x = '''$x$'''; // /// 18: compile-time error + x = '''$$x'''; // /// 19: compile-time error + x = '''$ '''; // /// 20: compile-time error return x; } diff --git a/tests/language/string_interpolation_test.dart b/tests/language/string_interpolation_test.dart index ab59045400c..5a4f897c0c3 100644 --- a/tests/language/string_interpolation_test.dart +++ b/tests/language/string_interpolation_test.dart @@ -59,7 +59,7 @@ class StringInterpolationTest { Expect.equals("}", "escaped \${3+2}"[17]); if (alwaysFalse) { - "${i.toHorse()}"; //# 01: static type warning + "${i.toHorse()}"; /// 01: static type warning } Expect.equals("${m}", "$m"); diff --git a/tests/language/substring_test.dart b/tests/language/substring_test.dart index ccc92f6ffd5..e2dc3f1712a 100644 --- a/tests/language/substring_test.dart +++ b/tests/language/substring_test.dart @@ -8,8 +8,8 @@ import "package:expect/expect.dart"; main() { try { - print("abcdef".substring(1.5, 3.5)); // //# 01: static type warning - Expect.fail("Should have thrown an exception"); // //# 01: continued + print("abcdef".substring(1.5, 3.5)); // /// 01: static type warning + Expect.fail("Should have thrown an exception"); // /// 01: continued } on TypeError catch (e) { // OK. } on ArgumentError catch (e) { diff --git a/tests/language/super_bound_closure_test.dart b/tests/language/super_bound_closure_test.dart index 0a48aa536fd..608c0f05432 100644 --- a/tests/language/super_bound_closure_test.dart +++ b/tests/language/super_bound_closure_test.dart @@ -76,15 +76,15 @@ class B extends A { fooIntercept27() => confuse(super.lastWhere)(0); fooIntercept28() => confuse(super.lastWhere)(3, orElse: 77); - bar([var optional]) => -1; // //# 01: static type warning - bar2({ namedOptional }) => -1; // //# 01: continued - bar3(x, [var optional]) => -1; // //# 01: continued - bar4(x, { namedOptional }) => -1; //# 01: continued + bar([var optional]) => -1; // /// 01: static type warning + bar2({ namedOptional }) => -1; // /// 01: continued + bar3(x, [var optional]) => -1; // /// 01: continued + bar4(x, { namedOptional }) => -1; /// 01: continued - gee([var optional]) => -1; // //# 01: continued - gee2({ namedOptional }) => -1; // //# 01: continued - gee3(x, [var optional]) => -1; // //# 01: continued - gee4(x, { namedOptional }) => -1; //# 01: continued + gee([var optional]) => -1; // /// 01: continued + gee2({ namedOptional }) => -1; // /// 01: continued + gee3(x, [var optional]) => -1; // /// 01: continued + gee4(x, { namedOptional }) => -1; /// 01: continued add([var optional = 33]) => -1; trim({ namedOptional: 22 }) => -1; @@ -105,27 +105,27 @@ main() { var ignored2 = list[confuse(3)]; var t = b.gee() + b.gee2() + b.gee3(9) + b.gee4(19); - Expect.equals(-4, t); //# 01: continued + Expect.equals(-4, t); /// 01: continued t = b.shuffle() + b.toList() + b.lastIndexOf(1) + b.lastWhere(2); Expect.equals(-4, t); - Expect.equals(499, b.foo()); // //# 01: continued - Expect.equals(500, b.foo2()); //# 01: continued - Expect.equals(42, b.foo3()); // //# 01: continued - Expect.equals(117, b.foo4()); //# 01: continued - Expect.equals(498, b.foo5()); //# 01: continued - Expect.equals(468, b.foo6()); //# 01: continued - Expect.equals(426, b.foo7()); //# 01: continued - Expect.equals(502, b.foo8()); //# 01: continued + Expect.equals(499, b.foo()); // /// 01: continued + Expect.equals(500, b.foo2()); /// 01: continued + Expect.equals(42, b.foo3()); // /// 01: continued + Expect.equals(117, b.foo4()); /// 01: continued + Expect.equals(498, b.foo5()); /// 01: continued + Expect.equals(468, b.foo6()); /// 01: continued + Expect.equals(426, b.foo7()); /// 01: continued + Expect.equals(502, b.foo8()); /// 01: continued - Expect.equals(499, b.fooGee()); // //# 01: continued - Expect.equals(500, b.fooGee2()); //# 01: continued - Expect.equals(42, b.fooGee3()); // //# 01: continued - Expect.equals(117, b.fooGee4()); //# 01: continued - Expect.equals(498, b.fooGee5()); //# 01: continued - Expect.equals(468, b.fooGee6()); //# 01: continued - Expect.equals(426, b.fooGee7()); //# 01: continued - Expect.equals(502, b.fooGee8()); //# 01: continued + Expect.equals(499, b.fooGee()); // /// 01: continued + Expect.equals(500, b.fooGee2()); /// 01: continued + Expect.equals(42, b.fooGee3()); // /// 01: continued + Expect.equals(117, b.fooGee4()); /// 01: continued + Expect.equals(498, b.fooGee5()); /// 01: continued + Expect.equals(468, b.fooGee6()); /// 01: continued + Expect.equals(426, b.fooGee7()); /// 01: continued + Expect.equals(502, b.fooGee8()); /// 01: continued Expect.equals(1267, b.fooIntercept()); Expect.equals(1236, b.fooIntercept2()); diff --git a/tests/language/super_call3_test.dart b/tests/language/super_call3_test.dart index 56762fc0ea0..a477cfa15b7 100644 --- a/tests/language/super_call3_test.dart +++ b/tests/language/super_call3_test.dart @@ -8,7 +8,7 @@ import "package:expect/expect.dart"; class A { A( - this.x // //# 01: compile-time error + this.x // /// 01: compile-time error ); final foo = 499; } @@ -23,7 +23,7 @@ class B2 extends A { class C { C - .named // //# 02: compile-time error + .named // /// 02: compile-time error (); final foo = 499; } diff --git a/tests/language/super_conditional_operator_test.dart b/tests/language/super_conditional_operator_test.dart index 52befc38545..100a9a4c979 100644 --- a/tests/language/super_conditional_operator_test.dart +++ b/tests/language/super_conditional_operator_test.dart @@ -13,27 +13,27 @@ class B { class C extends B { C() - : super?.namedConstructor() //# 01: compile-time error + : super?.namedConstructor() /// 01: compile-time error ; test() { - super?.field = 1; //# 02: compile-time error - super?.field += 1; //# 03: compile-time error - super?.field ??= 1; //# 04: compile-time error - super?.field; //# 05: compile-time error - 1 * super?.field; //# 06: compile-time error - -super?.field; //# 07: compile-time error - ~super?.field; //# 08: compile-time error - !super?.field; //# 09: compile-time error - --super?.field; //# 10: compile-time error - ++super?.field; //# 11: compile-time error - super?.method(); //# 12: compile-time error - 1 * super?.method(); //# 13: compile-time error - -super?.method(); //# 14: compile-time error - ~super?.method(); //# 15: compile-time error - !super?.method(); //# 16: compile-time error - --super?.method(); //# 17: compile-time error - ++super?.method(); //# 18: compile-time error + super?.field = 1; /// 02: compile-time error + super?.field += 1; /// 03: compile-time error + super?.field ??= 1; /// 04: compile-time error + super?.field; /// 05: compile-time error + 1 * super?.field; /// 06: compile-time error + -super?.field; /// 07: compile-time error + ~super?.field; /// 08: compile-time error + !super?.field; /// 09: compile-time error + --super?.field; /// 10: compile-time error + ++super?.field; /// 11: compile-time error + super?.method(); /// 12: compile-time error + 1 * super?.method(); /// 13: compile-time error + -super?.method(); /// 14: compile-time error + ~super?.method(); /// 15: compile-time error + !super?.method(); /// 16: compile-time error + --super?.method(); /// 17: compile-time error + ++super?.method(); /// 18: compile-time error } } diff --git a/tests/language/super_no_such_method1_test.dart b/tests/language/super_no_such_method1_test.dart index 48a63f3bd9c..3ee615112eb 100644 --- a/tests/language/super_no_such_method1_test.dart +++ b/tests/language/super_no_such_method1_test.dart @@ -11,9 +11,9 @@ class A { class B extends A { noSuchMethod(im) => 87; - foo() => super.foo(); //# 01: static type warning + foo() => super.foo(); /// 01: static type warning } main() { - Expect.equals(42, new B().foo()); //# 01: continued + Expect.equals(42, new B().foo()); /// 01: continued } \ No newline at end of file diff --git a/tests/language/super_no_such_method2_test.dart b/tests/language/super_no_such_method2_test.dart index b5151158cab..cbd46216d66 100644 --- a/tests/language/super_no_such_method2_test.dart +++ b/tests/language/super_no_such_method2_test.dart @@ -11,9 +11,9 @@ class A { class B extends A { noSuchMethod(im) => 87; - get foo => super.foo; //# 01: static type warning + get foo => super.foo; /// 01: static type warning } main() { - Expect.equals(42, new B().foo); //# 01: continued + Expect.equals(42, new B().foo); /// 01: continued } \ No newline at end of file diff --git a/tests/language/super_no_such_method3_test.dart b/tests/language/super_no_such_method3_test.dart index 3e81f233538..ad5d2579d70 100644 --- a/tests/language/super_no_such_method3_test.dart +++ b/tests/language/super_no_such_method3_test.dart @@ -17,10 +17,10 @@ class B extends A { result = 87; } - set foo(v) => super.foo = v; //# 01: static type warning + set foo(v) => super.foo = v; /// 01: static type warning } main() { - new B().foo = 0; // //# 01: continued - Expect.equals(42, result); //# 01: continued + new B().foo = 0; // /// 01: continued + Expect.equals(42, result); /// 01: continued } \ No newline at end of file diff --git a/tests/language/super_no_such_method4_test.dart b/tests/language/super_no_such_method4_test.dart index 0d84aef6d00..7d88a545ecc 100644 --- a/tests/language/super_no_such_method4_test.dart +++ b/tests/language/super_no_such_method4_test.dart @@ -11,9 +11,9 @@ class A { class B extends Object with A { noSuchMethod(im) => 87; - foo() => super.foo(); //# 01: static type warning + foo() => super.foo(); /// 01: static type warning } main() { - Expect.equals(42, new B().foo()); //# 01: continued + Expect.equals(42, new B().foo()); /// 01: continued } \ No newline at end of file diff --git a/tests/language/super_no_such_method5_test.dart b/tests/language/super_no_such_method5_test.dart index 3076dc48fd3..fba8087b27f 100644 --- a/tests/language/super_no_such_method5_test.dart +++ b/tests/language/super_no_such_method5_test.dart @@ -9,9 +9,9 @@ class A { } class B extends Object with A { - foo() => super.foo(); //# 01: static type warning + foo() => super.foo(); /// 01: static type warning } main() { - Expect.equals(42, new B().foo()); //# 01: continued + Expect.equals(42, new B().foo()); /// 01: continued } \ No newline at end of file diff --git a/tests/language/super_operator_index_test.dart b/tests/language/super_operator_index_test.dart index 10b7a36c41b..36c6819fee2 100644 --- a/tests/language/super_operator_index_test.dart +++ b/tests/language/super_operator_index_test.dart @@ -11,8 +11,8 @@ class A { class B extends A { foo() { super[4] = 42; - super[4] += 5; //# 01: static type warning, runtime error - return super[2]; //# 02: static type warning, runtime error + super[4] += 5; /// 01: static type warning, runtime error + return super[2]; /// 02: static type warning, runtime error } } @@ -22,17 +22,17 @@ class C { class D extends C { foo() { - super[4] = 42; //# 03: static type warning, runtime error - super[4] += 5; //# 04: static type warning, runtime error + super[4] = 42; /// 03: static type warning, runtime error + super[4] += 5; /// 04: static type warning, runtime error return super[2]; } } class E { foo() { - super[4] = 42; //# 05: static type warning, runtime error - super[4] += 5; //# 06: static type warning, runtime error - return super[2]; //# 07: static type warning, runtime error + super[4] = 42; /// 05: static type warning, runtime error + super[4] += 5; /// 06: static type warning, runtime error + return super[2]; /// 07: static type warning, runtime error } } diff --git a/tests/language/switch_bad_case_test.dart b/tests/language/switch_bad_case_test.dart index 29c2843d44b..7b9e9997cbb 100644 --- a/tests/language/switch_bad_case_test.dart +++ b/tests/language/switch_bad_case_test.dart @@ -19,18 +19,18 @@ caesarSays(n) { return "I"; case 4: return "IV"; - case "M": // //# 01: compile-time error - return 1000; // //# 01: continued + case "M": // /// 01: compile-time error + return 1000; // /// 01: continued } return null; } archimedesSays(n) { - switch (n) { // //# 02: continued - case 3.14: // //# 02: compile-time error - return "Pi"; // //# 02: continued - case 2.71828: // //# 02: continued - return "Huh?"; // //# 02: continued - } // //# 02: continued + switch (n) { // /// 02: continued + case 3.14: // /// 02: compile-time error + return "Pi"; // /// 02: continued + case 2.71828: // /// 02: continued + return "Huh?"; // /// 02: continued + } // /// 02: continued return null; } diff --git a/tests/language/switch_case_test.dart b/tests/language/switch_case_test.dart index 2ed1df5b284..8d0b80d5ac2 100644 --- a/tests/language/switch_case_test.dart +++ b/tests/language/switch_case_test.dart @@ -14,7 +14,7 @@ class A { class B implements A { const B(); - operator ==(o) => true; // //# 00: compile-time error + operator ==(o) => true; // /// 00: compile-time error } class C implements A { @@ -30,18 +30,18 @@ class D implements C { main() { switch (new B()) { - case const A.B(): Expect.fail("bad switch"); break; // //# 00: continued + case const A.B(): Expect.fail("bad switch"); break; // /// 00: continued } switch (new C()) { case const C(): Expect.fail("bad switch"); break; case const A.C(): Expect.fail("bad switch"); break; case const A.C2(): Expect.fail("bad switch"); break; - case const A(): Expect.fail("bad switch"); break; // //# 01: compile-time error + case const A(): Expect.fail("bad switch"); break; // /// 01: compile-time error } switch (new A()) { case const A(): Expect.fail("bad switch"); break; - case const A.B(): Expect.fail("bad switch"); break; // //# 02: compile-time error + case const A.B(): Expect.fail("bad switch"); break; // /// 02: compile-time error } } diff --git a/tests/language/switch_case_warn_test.dart b/tests/language/switch_case_warn_test.dart index eb68bb01eb1..9890b9ca8b1 100644 --- a/tests/language/switch_case_warn_test.dart +++ b/tests/language/switch_case_warn_test.dart @@ -34,12 +34,12 @@ void testSwitch(int x) { nop(x); continue LAST; // Avoid warning for "return;"" and "return e;" in same function. - case 6: // //# retnon: ok - nop(x); // //# retnon: continued - return; // //# retnon: continued - case 7: // //# retval: ok - nop(x); // //# retval: continued - return x; // //# retval: continued + case 6: // /// retnon: ok + nop(x); // /// retnon: continued + return; // /// retnon: continued + case 7: // /// retval: ok + nop(x); // /// retval: continued + return x; // /// retval: continued case 8: nop(x); throw x; @@ -67,14 +67,14 @@ void testSwitch(int x) { nop(x); continue LAST; } - case 16: { // //# retnon: continued - nop(x); // //# retnon: continued - return; // //# retnon: continued - } // //# retnon: continued - case 17: { // //# retval: continued - nop(x); // //# retval: continued - return x; // //# retval: continued - } // //# retval: continued + case 16: { // /// retnon: continued + nop(x); // /// retnon: continued + return; // /// retnon: continued + } // /// retnon: continued + case 17: { // /// retval: continued + nop(x); // /// retval: continued + return x; // /// retval: continued + } // /// retval: continued case 18: { nop(x); throw x; @@ -107,77 +107,77 @@ void testSwitchWarn(x) { // Wrap in loop as target for continue/break. LOOP: do { switch (x) { - case 0: // //# 01: static type warning - case 1: { // //# 01: continued - { // //# 01: continued - nop(x); // //# 01: continued - break; // Break switch. // //# 01: continued - } // //# 01: continued - } // //# 01: continued - case 2: { // //# 02: static type warning - { // //# 02: continued - nop(x); // //# 02: continued - break LOOP; // //# 02: continued - } // //# 02: continued - } // //# 02: continued - case 3: { // //# 03: static type warning - { // //# 03: continued - nop(x); // //# 03: continued - continue; // Continue loop. //# 03: continued - } // //# 03: continued - } // //# 03: continued - case 4: { // //# 04: static type warning - { // //# 04: continued - nop(x); // //# 04: continued - continue LOOP; // //# 04: continued - } // //# 04: continued - } // //# 04: continued - case 5: { // //# 05: static type warning - { // //# 05: continued - nop(x); // //# 05: continued - continue LAST; // //# 05: continued - } // //# 05: continued - } // //# 05: continued - case 6: { // //# 06: static type warning - { // //# 06: continued - nop(x); // //# 06: continued - return; // //# 06: continued - } // //# 06: continued - } // //# 06: continued - case 7: { // //# 07: static type warning - { // //# 07: continued - nop(x); // //# 07: continued - return x; // //# 07: continued - } // //# 07: continued - } // //# 07: continued - case 8: { // //# 08: static type warning - { // //# 08: continued - nop(x); // //# 08: continued - throw x; // //# 08: continued - } // //# 08: continued - } // //# 08: continued - case 9: { // //# 09: static type warning - { // //# 09: continued - nop(x); // //# 09: continued - rethrow; // //# 09: continued - } // //# 09: continued - } // //# 09: continued - case 10: // //# 10: static type warning - while (true) break; // //# 10: continued - case 11: // //# 11: static type warning - do break; while (true); // //# 11: continued - case 12: // //# 12: static type warning - for (;;) break; // //# 12: continued - case 13: // //# 13: static type warning - for (var _ in []) break; // //# 13: continued - case 14: // //# 14: static type warning - if (x) break; else break; // //# 14: continued - case 15: // //# 15: static type warning - (throw 0); // //# 15: continued - case 16: // //# 16: static type warning - nop(x); // fallthrough. // //# 16: continued - case 17: // //# 17: static type warning - L: break; // //# 17: continued + case 0: // /// 01: static type warning + case 1: { // /// 01: continued + { // /// 01: continued + nop(x); // /// 01: continued + break; // Break switch. // /// 01: continued + } // /// 01: continued + } // /// 01: continued + case 2: { // /// 02: static type warning + { // /// 02: continued + nop(x); // /// 02: continued + break LOOP; // /// 02: continued + } // /// 02: continued + } // /// 02: continued + case 3: { // /// 03: static type warning + { // /// 03: continued + nop(x); // /// 03: continued + continue; // Continue loop. /// 03: continued + } // /// 03: continued + } // /// 03: continued + case 4: { // /// 04: static type warning + { // /// 04: continued + nop(x); // /// 04: continued + continue LOOP; // /// 04: continued + } // /// 04: continued + } // /// 04: continued + case 5: { // /// 05: static type warning + { // /// 05: continued + nop(x); // /// 05: continued + continue LAST; // /// 05: continued + } // /// 05: continued + } // /// 05: continued + case 6: { // /// 06: static type warning + { // /// 06: continued + nop(x); // /// 06: continued + return; // /// 06: continued + } // /// 06: continued + } // /// 06: continued + case 7: { // /// 07: static type warning + { // /// 07: continued + nop(x); // /// 07: continued + return x; // /// 07: continued + } // /// 07: continued + } // /// 07: continued + case 8: { // /// 08: static type warning + { // /// 08: continued + nop(x); // /// 08: continued + throw x; // /// 08: continued + } // /// 08: continued + } // /// 08: continued + case 9: { // /// 09: static type warning + { // /// 09: continued + nop(x); // /// 09: continued + rethrow; // /// 09: continued + } // /// 09: continued + } // /// 09: continued + case 10: // /// 10: static type warning + while (true) break; // /// 10: continued + case 11: // /// 11: static type warning + do break; while (true); // /// 11: continued + case 12: // /// 12: static type warning + for (;;) break; // /// 12: continued + case 13: // /// 13: static type warning + for (var _ in []) break; // /// 13: continued + case 14: // /// 14: static type warning + if (x) break; else break; // /// 14: continued + case 15: // /// 15: static type warning + (throw 0); // /// 15: continued + case 16: // /// 16: static type warning + nop(x); // fallthrough. // /// 16: continued + case 17: // /// 17: static type warning + L: break; // /// 17: continued LAST: case 99: // Last case can't cause static warning. diff --git a/tests/language/symbol_literal_test.dart b/tests/language/symbol_literal_test.dart index dcb413662f1..b4520ba7240 100644 --- a/tests/language/symbol_literal_test.dart +++ b/tests/language/symbol_literal_test.dart @@ -42,5 +42,5 @@ main() { Expect.equals(1, m[#B]); // Tries to call the symbol literal #a.toString - Expect.throws(() => #a.toString(), (e) => e is NoSuchMethodError); //# 01: static type warning + Expect.throws(() => #a.toString(), (e) => e is NoSuchMethodError); /// 01: static type warning } diff --git a/tests/language/sync_generator1_test.dart b/tests/language/sync_generator1_test.dart index 565c5038a6c..88e1fd409c1 100644 --- a/tests/language/sync_generator1_test.dart +++ b/tests/language/sync_generator1_test.dart @@ -44,7 +44,7 @@ einsZwei() sync* { dreiVier() sync* { // Throws type error: yielded object is not an iterable. - yield* 3; //# 01: static type warning + yield* 3; /// 01: static type warning } main() { @@ -80,6 +80,6 @@ main() { print(einsZwei()); Expect.equals("(1, 2, 3, 5, [6])", einsZwei().toString()); - Expect.throws(() => dreiVier().toString()); //# 01: continued + Expect.throws(() => dreiVier().toString()); /// 01: continued } } diff --git a/tests/language/sync_generator2_test.dart b/tests/language/sync_generator2_test.dart index f4241b34190..82d58639164 100644 --- a/tests/language/sync_generator2_test.dart +++ b/tests/language/sync_generator2_test.dart @@ -13,38 +13,38 @@ var await = "topLevelAwait"; var yield = "topLevelYield"; test01() sync* { - var yield = 0; // //# 01: compile-time error - var await = 0; // //# 02: compile-time error - var async = 0; // //# 03: compile-time error - bool yield() => false; //# 04: compile-time error - bool await() => false; //# 05: compile-time error - bool async() => false; //# 06: compile-time error + var yield = 0; // /// 01: compile-time error + var await = 0; // /// 02: compile-time error + var async = 0; // /// 03: compile-time error + bool yield() => false; /// 04: compile-time error + bool await() => false; /// 05: compile-time error + bool async() => false; /// 06: compile-time error var x1 = sync; - var x2 = async; // //# 07: compile-time error - var x3 = await; // //# 08: compile-time error - var x4 = await 55; // //# 09: compile-time error - var x4 = yield; // //# 10: compile-time error + var x2 = async; // /// 07: compile-time error + var x3 = await; // /// 08: compile-time error + var x4 = await 55; // /// 09: compile-time error + var x4 = yield; // /// 10: compile-time error var stream = new Stream.fromIterable([1, 2, 3]); - await for (var e in stream) print(e); // //# 11: compile-time error + await for (var e in stream) print(e); // /// 11: compile-time error } test02() sync* { yield 12321; - return null; // //# 20: compile-time error + return null; // /// 20: compile-time error } -test03() sync* => null; // //# 30: compile-time error +test03() sync* => null; // /// 30: compile-time error -get test04 sync* => null; // //# 40: compile-time error -set test04(a) sync* { print(a); } // //# 41: compile-time error +get test04 sync* => null; // /// 40: compile-time error +set test04(a) sync* { print(a); } // /// 41: compile-time error class K { - K() sync* {}; // //# 50: compile-time error + K() sync* {}; // /// 50: compile-time error get nix sync* { } - get garnix sync* => null; // //# 51: compile-time error - set etwas(var z) sync* { } // //# 52: compile-time error + get garnix sync* => null; // /// 51: compile-time error + set etwas(var z) sync* { } // /// 52: compile-time error sync() sync* { yield sync; // Yields a tear-off of the sync() method. } @@ -55,13 +55,13 @@ main() { x = test01(); Expect.equals("()", x.toString()); x = test02(); - test03(); //# 30: continued + test03(); /// 30: continued Expect.equals("(12321)", x.toString()); - x = test04; // //# 40: continued - test04 = x; // //# 41: continued + x = test04; // /// 40: continued + test04 = x; // /// 41: continued x = new K(); - print(x.garnix); //# 51: continued - x.etwas = null; //# 52: continued + print(x.garnix); /// 51: continued + x.etwas = null; /// 52: continued print(x.sync().toList()); Expect.equals(1, x.sync().length); // Expect.isTrue(x.sync().single is Function); diff --git a/tests/language/sync_generator3_test.dart b/tests/language/sync_generator3_test.dart index d145736e545..55120717806 100644 --- a/tests/language/sync_generator3_test.dart +++ b/tests/language/sync_generator3_test.dart @@ -43,6 +43,6 @@ test2() { } main() { - test1(); // //# test1: ok - test2(); // //# test2: ok + test1(); // /// test1: ok + test2(); // /// test2: ok } \ No newline at end of file diff --git a/tests/language/syncstar_yield_test.dart b/tests/language/syncstar_yield_test.dart index c134c717688..80485b9d19f 100644 --- a/tests/language/syncstar_yield_test.dart +++ b/tests/language/syncstar_yield_test.dart @@ -40,15 +40,15 @@ main() { foo2(4).take(10).toList()); Iterable t = foo3(0); Iterator it1 = t.iterator; - Iterator it2 = t.iterator; //# copyParameters: ok + Iterator it2 = t.iterator; /// copyParameters: ok it1.moveNext(); - it2.moveNext(); //# copyParameters: continued + it2.moveNext(); /// copyParameters: continued Expect.equals(2, it1.current); // TODO(sigurdm): Check up on the spec here. - Expect.equals(2, it2.current); // //# copyParameters: continued + Expect.equals(2, it2.current); // /// copyParameters: continued Expect.isFalse(it1.moveNext()); // Test that two `moveNext()` calls are fine. Expect.isFalse(it1.moveNext()); - Expect.isFalse(it2.moveNext()); //# copyParameters: continued - Expect.isFalse(it2.moveNext()); //# copyParameters: continued + Expect.isFalse(it2.moveNext()); /// copyParameters: continued + Expect.isFalse(it2.moveNext()); /// copyParameters: continued } diff --git a/tests/language/syntax_test.dart b/tests/language/syntax_test.dart index c0aa585a395..51b6f448e5a 100644 --- a/tests/language/syntax_test.dart +++ b/tests/language/syntax_test.dart @@ -4,186 +4,186 @@ class SyntaxTest { // "this" cannot be used as a field name. - SyntaxTest this; //# 01: compile-time error + SyntaxTest this; /// 01: compile-time error // Syntax error. - foo {} //# 02: compile-time error + foo {} /// 02: compile-time error // Syntax error. - static foo {} //# 03: compile-time error + static foo {} /// 03: compile-time error // Syntax error. - operator +=() {} //# 04: compile-time error + operator +=() {} /// 04: compile-time error // Syntax error. - operator -=() {} //# 05: compile-time error + operator -=() {} /// 05: compile-time error // Syntax error. - operator *=() {} //# 06: compile-time error + operator *=() {} /// 06: compile-time error // Syntax error. - operator /=() {} //# 07: compile-time error + operator /=() {} /// 07: compile-time error // Syntax error. - operator ~/=() {} //# 08: compile-time error + operator ~/=() {} /// 08: compile-time error // Syntax error. - operator %=() {} //# 09: compile-time error + operator %=() {} /// 09: compile-time error // Syntax error. - operator <<=() {} //# 10: compile-time error + operator <<=() {} /// 10: compile-time error // Syntax error. - operator >>=() {} //# 11: compile-time error + operator >>=() {} /// 11: compile-time error // Syntax error. - operator >>>=() {} //# 12: compile-time error + operator >>>=() {} /// 12: compile-time error // Syntax error. - operator &=() {} //# 13: compile-time error + operator &=() {} /// 13: compile-time error // Syntax error. - operator ^=() {} //# 14: compile-time error + operator ^=() {} /// 14: compile-time error // Syntax error. - operator |=() {} //# 15: compile-time error + operator |=() {} /// 15: compile-time error // Syntax error. - operator ?() {} //# 16: compile-time error + operator ?() {} /// 16: compile-time error // Syntax error. - operator ||() {} //# 17: compile-time error + operator ||() {} /// 17: compile-time error // Syntax error. - operator &&() {} //# 18: compile-time error + operator &&() {} /// 18: compile-time error // Syntax error. - operator !=() {} //# 19: compile-time error + operator !=() {} /// 19: compile-time error // Syntax error. - operator ===() {} //# 20: compile-time error + operator ===() {} /// 20: compile-time error // Syntax error. - operator !==() {} //# 21: compile-time error + operator !==() {} /// 21: compile-time error // Syntax error. - operator is() {} //# 22: compile-time error + operator is() {} /// 22: compile-time error // Syntax error. - operator !() {} //# 23: compile-time error + operator !() {} /// 23: compile-time error // Syntax error. - operator ++() {} //# 24: compile-time error + operator ++() {} /// 24: compile-time error // Syntax error. - operator --() {} //# 25: compile-time error + operator --() {} /// 25: compile-time error // Syntax error. - bool operator ===(A other) { return true; } //# 26: compile-time error + bool operator ===(A other) { return true; } /// 26: compile-time error int sample; } -fisk {} //# 27: compile-time error +fisk {} /// 27: compile-time error class DOMWindow {} class Window extends DOMWindow -native "*Window" //# 28: compile-time error +native "*Window" /// 28: compile-time error {} class Console -native "=(typeof console == 'undefined' ? {} : console)" //# 29: compile-time error +native "=(typeof console == 'undefined' ? {} : console)" /// 29: compile-time error {} class NativeClass -native "FooBar" //# 30: compile-time error +native "FooBar" /// 30: compile-time error {} abstract class Fisk {} class BoolImplementation implements Fisk -native "Boolean" //# 31: compile-time error +native "Boolean" /// 31: compile-time error {} class _JSON -native 'JSON' //# 32: compile-time error +native 'JSON' /// 32: compile-time error {} class ListFactory implements List -native "Array" //# 33: compile-time error +native "Array" /// 33: compile-time error {} -abstract class I implements UNKNOWN; //# 34: compile-time error +abstract class I implements UNKNOWN; /// 34: compile-time error class XWindow extends DOMWindow -hest "*Window" //# 35: compile-time error +hest "*Window" /// 35: compile-time error {} class XConsole -hest "=(typeof console == 'undefined' ? {} : console)" //# 36: compile-time error +hest "=(typeof console == 'undefined' ? {} : console)" /// 36: compile-time error {} class XNativeClass -hest "FooBar" //# 37: compile-time error +hest "FooBar" /// 37: compile-time error {} class XBoolImplementation implements Fisk -hest "Boolean" //# 38: compile-time error +hest "Boolean" /// 38: compile-time error {} class _JSONX -hest 'JSON' //# 39: compile-time error +hest 'JSON' /// 39: compile-time error {} class XListFactory implements List -hest "Array" //# 40: compile-time error +hest "Array" /// 40: compile-time error {} class YWindow extends DOMWindow -for "*Window" //# 41: compile-time error +for "*Window" /// 41: compile-time error {} class YConsole -for "=(typeof console == 'undefined' ? {} : console)" //# 42: compile-time error +for "=(typeof console == 'undefined' ? {} : console)" /// 42: compile-time error {} class YNativeClass -for "FooBar" //# 43: compile-time error +for "FooBar" /// 43: compile-time error {} class YBoolImplementation implements Fisk -for "Boolean" //# 44: compile-time error +for "Boolean" /// 44: compile-time error {} class _JSONY -for 'JSON' //# 45: compile-time error +for 'JSON' /// 45: compile-time error {} class YListFactory implements List -for "Array" //# 46: compile-time error +for "Array" /// 46: compile-time error {} class A { const A() - {} //# 47: compile-time error + {} /// 47: compile-time error ; } abstract class G {} -typedef (); //# 48: compile-time error +typedef (); /// 48: compile-time error class B -extends void //# 49: compile-time error +extends void /// 49: compile-time error {} main() { try { new SyntaxTest(); - new SyntaxTest().foo(); //# 02: continued - SyntaxTest.foo(); //# 03: continued - fisk(); //# 27: continued + new SyntaxTest().foo(); /// 02: continued + SyntaxTest.foo(); /// 03: continued + fisk(); /// 27: continued new Window(); new Console(); @@ -193,7 +193,7 @@ main() { new ListFactory(); new ListFactory(); var x = null; - x is I; //# 34: continued + x is I; /// 34: continued new XConsole(); new XNativeClass(); @@ -210,33 +210,33 @@ main() { new YListFactory(); futureOf(x) {} - if (!(fisk futureOf(false))) {} //# 50: compile-time error - if (!(await futureOf(false))) {} //# 51: compile-time error + if (!(fisk futureOf(false))) {} /// 50: compile-time error + if (!(await futureOf(false))) {} /// 51: compile-time error - void f{} //# 52: compile-time error - G g; //# 53: compile-time error - f(void) {}; //# 54: compile-time error + void f{} /// 52: compile-time error + G g; /// 53: compile-time error + f(void) {}; /// 54: compile-time error optionalArg([x]) {} optionalArg( - void (var i) {} //# 55: compile-time error + void (var i) {} /// 55: compile-time error ); - function __PROTO__$(...args) { return 12; } //# 56: compile-time error - G<> t; //# 57: compile-time error - G t; //# 58: compile-time error - A a = null; //# 59: compile-time error - void v; //# 60: compile-time error - void v = null; //# 61: compile-time error - print(null is void); //# 62: compile-time error + function __PROTO__$(...args) { return 12; } /// 56: compile-time error + G<> t; /// 57: compile-time error + G t; /// 58: compile-time error + A a = null; /// 59: compile-time error + void v; /// 60: compile-time error + void v = null; /// 61: compile-time error + print(null is void); /// 62: compile-time error new A(); new B(); new Bad(); - 1 + 2 = 1; //# 63: compile-time error - new SyntaxTest() = 1; //# 64: compile-time error - futureOf(null) = 1; //# 65: compile-time error + 1 + 2 = 1; /// 63: compile-time error + new SyntaxTest() = 1; /// 64: compile-time error + futureOf(null) = 1; /// 65: compile-time error new C(); } catch (ex) { @@ -246,11 +246,11 @@ main() { } class Bad { - factory Bad 1; B.forward() - : this?.namedConstructor() //# 01: compile-time error + : this?.namedConstructor() /// 01: compile-time error ; test() { diff --git a/tests/language/this_test.dart b/tests/language/this_test.dart index d66500b996d..df5a599be5f 100644 --- a/tests/language/this_test.dart +++ b/tests/language/this_test.dart @@ -7,14 +7,14 @@ class Foo { f() {} testMe() { - x.this; //# 01: compile-time error - x.this(); //# 02: compile-time error - x.this.x; //# 03: compile-time error - x.this().x; //# 04: compile-time error - f().this; //# 05: compile-time error - f().this(); //# 06: compile-time error - f().this.f(); //# 07: compile-time error - f().this().f(); //# 08: compile-time error + x.this; /// 01: compile-time error + x.this(); /// 02: compile-time error + x.this.x; /// 03: compile-time error + x.this().x; /// 04: compile-time error + f().this; /// 05: compile-time error + f().this(); /// 06: compile-time error + f().this.f(); /// 07: compile-time error + f().this().f(); /// 08: compile-time error } } diff --git a/tests/language/top_level_getter_no_setter1_test.dart b/tests/language/top_level_getter_no_setter1_test.dart index 967fde66474..80b429e4b10 100644 --- a/tests/language/top_level_getter_no_setter1_test.dart +++ b/tests/language/top_level_getter_no_setter1_test.dart @@ -13,12 +13,12 @@ int get getter { class Class { method() { try { - getter++; //# 01: static type warning + getter++; /// 01: static type warning } on NoSuchMethodError catch(e) { - Expect.isTrue(getter_visited); //# 01: continued + Expect.isTrue(getter_visited); /// 01: continued return; } - Expect.fail('Expected NoSuchMethodError'); //# 01: continued + Expect.fail('Expected NoSuchMethodError'); /// 01: continued } } diff --git a/tests/language/top_level_getter_no_setter2_test.dart b/tests/language/top_level_getter_no_setter2_test.dart index 0bc1406a243..98c437e8a52 100644 --- a/tests/language/top_level_getter_no_setter2_test.dart +++ b/tests/language/top_level_getter_no_setter2_test.dart @@ -14,12 +14,12 @@ class Class { method() { try { - getter++; //# 01: static type warning + getter++; /// 01: static type warning } on NoSuchMethodError catch(e) { - Expect.isTrue(getter_visited); //# 01: continued + Expect.isTrue(getter_visited); /// 01: continued return; } - Expect.fail('Expected NoSuchMethodError'); //# 01: continued + Expect.fail('Expected NoSuchMethodError'); /// 01: continued } } diff --git a/tests/language/toplevel_collision1_test.dart b/tests/language/toplevel_collision1_test.dart index 1582c232e0c..9707ea91636 100644 --- a/tests/language/toplevel_collision1_test.dart +++ b/tests/language/toplevel_collision1_test.dart @@ -4,10 +4,10 @@ int x = 100; -get x => 200; // //# 00: compile-time error -set x(var i) { print(i); } // //# 01: compile-time error +get x => 200; // /// 00: compile-time error +set x(var i) { print(i); } // /// 01: compile-time error -int x(a, b) { print(a + b); } // //# 02: compile-time error +int x(a, b) { print(a + b); } // /// 02: compile-time error void main() { diff --git a/tests/language/toplevel_collision2_test.dart b/tests/language/toplevel_collision2_test.dart index f992f3e3202..49a39d12b2a 100644 --- a/tests/language/toplevel_collision2_test.dart +++ b/tests/language/toplevel_collision2_test.dart @@ -9,10 +9,10 @@ get x => 200; set x(var i) { print(i); } // Error: there is already a getter for x -int x; // //# 00: compile-time error +int x; // /// 00: compile-time error // Error: there is already a getter named x. -int x(a, b) { print(a + b); } // //# 01: compile-time error +int x(a, b) { print(a + b); } // /// 01: compile-time error diff --git a/tests/language/try_catch_on_syntax_test.dart b/tests/language/try_catch_on_syntax_test.dart index 33335dad006..5c4ad351a2a 100644 --- a/tests/language/try_catch_on_syntax_test.dart +++ b/tests/language/try_catch_on_syntax_test.dart @@ -15,11 +15,11 @@ void test1() { try { throw new MyException1(); } - on on MyException2 catch (e) { } //# 02: compile-time error - catch MyException2 catch (e) { } //# 03: compile-time error - catch catch catch (e) { } //# 04: compile-time error - on (e) { } //# 05: compile-time error - catch MyException2 catch (e) { } //# 06: compile-time error + on on MyException2 catch (e) { } /// 02: compile-time error + catch MyException2 catch (e) { } /// 03: compile-time error + catch catch catch (e) { } /// 04: compile-time error + on (e) { } /// 05: compile-time error + catch MyException2 catch (e) { } /// 06: compile-time error on MyException2 catch (e) { foo = 1; } on MyException1 catch (e) { @@ -27,7 +27,7 @@ void test1() { } on MyException catch (e) { foo = 3; } - on UndefinedClass //# 07: static type warning + on UndefinedClass /// 07: static type warning catch(e) { foo = 4; } Expect.equals(2, foo); } @@ -37,8 +37,8 @@ testFinal() { throw "catch this!"; } catch (e, s) { // Test that the error and stack trace variables are final. - e = null; // //# 10: runtime error - s = null; // //# 11: runtime error + e = null; // /// 10: runtime error + s = null; // /// 11: runtime error } } diff --git a/tests/language/try_catch_syntax_test.dart b/tests/language/try_catch_syntax_test.dart index 3aa93eb2f59..518d3dca17a 100644 --- a/tests/language/try_catch_syntax_test.dart +++ b/tests/language/try_catch_syntax_test.dart @@ -12,36 +12,36 @@ main() { } testMissingCatch() { - try { } // //# 01: compile-time error + try { } // /// 01: compile-time error } testMissingTry() { - on Exception catch (e) { } // //# 02: compile-time error - on Exception catch (e, trace) { } // //# 03: compile-time error - finally { } // //# 04: compile-time error + on Exception catch (e) { } // /// 02: compile-time error + on Exception catch (e, trace) { } // /// 03: compile-time error + finally { } // /// 04: compile-time error } testDuplicateCatchVariable() { - try { } on Exception catch (e, e) { } //# 05: compile-time error + try { } on Exception catch (e, e) { } /// 05: compile-time error } testIllegalFinally() { - try { } finally (e) { } //# 06: compile-time error + try { } finally (e) { } /// 06: compile-time error } testIllegalCatch() { - try { } catch () { } // //# 07: compile-time error - try { } on MammaMia catch (e) { } //# 08: static type warning - try { } catch (var e) { } // //# 09: compile-time error - try { } catch (final e) { } // //# 10: compile-time error - try { } catch (int e) { } // //# 11: compile-time error - try { } catch (final int e) { } // //# 12: compile-time error - try { } catch ([e, s]) { } // //# 13: compile-time error - try { } catch (e, [s]) { } // //# 14: compile-time error - try { } catch (e, [s0, s1]) { } // //# 15: compile-time error + try { } catch () { } // /// 07: compile-time error + try { } on MammaMia catch (e) { } /// 08: static type warning + try { } catch (var e) { } // /// 09: compile-time error + try { } catch (final e) { } // /// 10: compile-time error + try { } catch (int e) { } // /// 11: compile-time error + try { } catch (final int e) { } // /// 12: compile-time error + try { } catch ([e, s]) { } // /// 13: compile-time error + try { } catch (e, [s]) { } // /// 14: compile-time error + try { } catch (e, [s0, s1]) { } // /// 15: compile-time error } testIllegalRethrow() { - try { rethrow; } catch (e) { } // //# 16: compile-time error - try { } catch (e) { } finally { rethrow; } //# 17: compile-time error + try { rethrow; } catch (e) { } // /// 16: compile-time error + try { } catch (e) { } finally { rethrow; } /// 17: compile-time error } diff --git a/tests/language/try_catch_test.dart b/tests/language/try_catch_test.dart index 2b126e460da..0d35d28f834 100644 --- a/tests/language/try_catch_test.dart +++ b/tests/language/try_catch_test.dart @@ -168,7 +168,7 @@ class TryCatchTest { } on String catch (e) { // Compile-time constants in unreachable catch blocks are still // compiled. - const y = x[0]; // //# 01: compile-time error + const y = x[0]; // /// 01: compile-time error Expect.fail("unreachable"); } } diff --git a/tests/language/type_check_const_function_typedef2_test.dart b/tests/language/type_check_const_function_typedef2_test.dart index bf98572da04..42a3d8c5c12 100644 --- a/tests/language/type_check_const_function_typedef2_test.dart +++ b/tests/language/type_check_const_function_typedef2_test.dart @@ -13,9 +13,9 @@ class A { const A(this.f); } -int // //# 00: static type warning, checked mode compile-time error +int // /// 00: static type warning, checked mode compile-time error foo( -String // //# 00: continued +String // /// 00: continued x) => 499; const a = const A(foo); diff --git a/tests/language/type_literal_prefix_call_test.dart b/tests/language/type_literal_prefix_call_test.dart index b80cb44be63..8dfdfb3b3ac 100644 --- a/tests/language/type_literal_prefix_call_test.dart +++ b/tests/language/type_literal_prefix_call_test.dart @@ -8,5 +8,5 @@ import 'dart:core' as core; // Check that calling a type with a prefix is allowed, but throws at runtime. main() { - Expect.throws(() => core.List(), (e) => e is core.NoSuchMethodError); //# 00: static type warning + Expect.throws(() => core.List(), (e) => e is core.NoSuchMethodError); /// 00: static type warning } diff --git a/tests/language/type_parameter_test.dart b/tests/language/type_parameter_test.dart index 1b91d0a8e44..eb39d1bdf19 100644 --- a/tests/language/type_parameter_test.dart +++ b/tests/language/type_parameter_test.dart @@ -17,28 +17,28 @@ class A { } static - T //# 01: static type warning, dynamic type error + T /// 01: static type warning, dynamic type error staticMethod( - T //# 02: static type warning, dynamic type error + T /// 02: static type warning, dynamic type error a) { final - T //# 03: static type warning, dynamic type error + T /// 03: static type warning, dynamic type error a = "not_null"; print(a); return a; } static final - T //# 04: static type warning, dynamic type error + T /// 04: static type warning, dynamic type error staticFinalField = "not_null"; static const - T //# 05: static type warning, checked mode compile-time error + T /// 05: static type warning, checked mode compile-time error staticConstField = "not_null"; static not_null() => "not_null"; static final - T //# 06: static type warning, dynamic type error + T /// 06: static type warning, dynamic type error staticFinalField2 = not_null(); // Assigning null to a malformed type is not a dynamic error. diff --git a/tests/language/type_promotion_assign_test.dart b/tests/language/type_promotion_assign_test.dart index d928fd2449c..51f0ee5d4b7 100644 --- a/tests/language/type_promotion_assign_test.dart +++ b/tests/language/type_promotion_assign_test.dart @@ -27,21 +27,21 @@ void main() { A a = new E(); if (a is B) { print(a.a); - print(a.b); //# 01: static type warning + print(a.b); /// 01: static type warning a = null; } if (a is B) { a = null; print(a.a); - print(a.b); //# 02: static type warning + print(a.b); /// 02: static type warning } if (a is B) { print(a.a); - print(a.b); //# 03: static type warning + print(a.b); /// 03: static type warning { a = null; } print(a.a); - print(a.b); //# 04: static type warning + print(a.b); /// 04: static type warning } } diff --git a/tests/language/type_promotion_closure_test.dart b/tests/language/type_promotion_closure_test.dart index 56d1d5b5daa..5c594439f65 100644 --- a/tests/language/type_promotion_closure_test.dart +++ b/tests/language/type_promotion_closure_test.dart @@ -47,7 +47,7 @@ void test1() { A a = new E(); if (a is B) { print(a.a); - print(a.b); //# 01: static type warning + print(a.b); /// 01: static type warning } void foo() { a = new D(); @@ -61,7 +61,7 @@ void test2() { } if (a is B) { print(a.a); - print(a.b); //# 02: static type warning + print(a.b); /// 02: static type warning } } @@ -72,12 +72,12 @@ void test3() { } if (a is B) { print(a.a); - print(a.b); //# 03: static type warning + print(a.b); /// 03: static type warning void foo() { a = new D(); } print(a.a); - print(a.b); //# 04: static type warning + print(a.b); /// 04: static type warning } } @@ -88,19 +88,19 @@ void test3a() { } if ((((a)) is B)) { print(a.a); - print(a.b); //# 15: static type warning + print(a.b); /// 15: static type warning void foo() { a = new D(); } print(a.a); - print(a.b); //# 16: static type warning + print(a.b); /// 16: static type warning } } void test4() { A a = new E(); if (a is B) { - func(() => a.b); //# 05: ok + func(() => a.b); /// 05: ok print(a.a); print(a.b); } @@ -109,7 +109,7 @@ void test4() { void test5() { A a = new E(); if (a is B) { - func(() => a.b); //# 06: static type warning + func(() => a.b); /// 06: static type warning print(a.a); } a = null; @@ -120,7 +120,7 @@ void test6() { if (a is B) { func(() => a); print(a.a); - print(a.b); //# 07: static type warning + print(a.b); /// 07: static type warning } a = null; } @@ -130,7 +130,7 @@ void test6a() { if (((a) is B)) { func(() => a); print(a.a); - print(a.b); //# 14: static type warning + print(a.b); /// 14: static type warning } a = null; } @@ -139,7 +139,7 @@ void test7() { A a = new E(); if (a is B && func(() => a)) { print(a.a); - print(a.b); //# 08: ok + print(a.b); /// 08: ok } a = null; } @@ -147,7 +147,7 @@ void test7() { void test8() { A a = new E(); if (a is B - && func(() => a.b) //# 09: static type warning + && func(() => a.b) /// 09: static type warning ) { print(a.a); } @@ -156,7 +156,7 @@ void test8() { void test9() { A a = new E(); - var b = a is B ? func(() => a.b) : false; //# 10: static type warning + var b = a is B ? func(() => a.b) : false; /// 10: static type warning a = null; } @@ -164,7 +164,7 @@ void test10() { List a = [new E()]; if (a is List) { func(() => a[0]); - print(a[0].b); //# 11: static type warning + print(a[0].b); /// 11: static type warning } a = null; } @@ -173,7 +173,7 @@ void test11() { List a = [new E()]; if (a is List) { func(() => a[0] = null); - print(a[0].b); //# 12: static type warning + print(a[0].b); /// 12: static type warning } a = null; } @@ -183,7 +183,7 @@ void test12() { if (a is B) { func(() => a++); print(a.a); - print(a.b); //# 13: static type warning + print(a.b); /// 13: static type warning } a = null; } diff --git a/tests/language/type_promotion_functions_test.dart b/tests/language/type_promotion_functions_test.dart index c9caf0359aa..bcf12b3c438 100644 --- a/tests/language/type_promotion_functions_test.dart +++ b/tests/language/type_promotion_functions_test.dart @@ -35,13 +35,13 @@ testFuncAtoDyn() { FuncAtoDyn funcAtoDyn = func; a = funcAtoDyn(new A()); b = funcAtoDyn(new B()); - c = funcAtoDyn(new C()); //# 01: static type warning + c = funcAtoDyn(new C()); /// 01: static type warning if (funcAtoDyn is FuncDynToDyn) { // No promotion: FuncDynToDyn !<< FuncAtoDyn. a = funcAtoDyn(new A()); b = funcAtoDyn(new B()); - c = funcAtoDyn(new C()); //# 11: static type warning + c = funcAtoDyn(new C()); /// 11: static type warning } } @@ -54,28 +54,28 @@ testFuncDynToDyn() { if (funcDynToDyn is FuncAtoDyn) { // Promotion: FuncAtoDyn << FuncDynToDyn. a = funcDynToDyn(new A()); b = funcDynToDyn(new B()); - c = funcDynToDyn(new C()); //# 09: static type warning + c = funcDynToDyn(new C()); /// 09: static type warning } if (funcDynToDyn is FuncDynToVoid) { // Promotion: FuncDynToVoid << FuncDynToDyn. - a = funcDynToDyn(new A()); //# 12: static type warning - b = funcDynToDyn(new B()); //# 13: static type warning - c = funcDynToDyn(new C()); //# 14: static type warning + a = funcDynToDyn(new A()); /// 12: static type warning + b = funcDynToDyn(new B()); /// 13: static type warning + c = funcDynToDyn(new C()); /// 14: static type warning } if (funcDynToDyn is FuncDynToA) { // Promotion: FuncDynToA << FuncDynToDyn. a = funcDynToDyn(new A()); b = funcDynToDyn(new B()); - c = funcDynToDyn(new C()); //# 10: static type warning + c = funcDynToDyn(new C()); /// 10: static type warning } } testFuncDynToVoid() { FuncDynToVoid funcDynToVoid = func; - a = funcDynToVoid(new A()); //# 02: static type warning - b = funcDynToVoid(new B()); //# 03: static type warning - c = funcDynToVoid(new C()); //# 04: static type warning + a = funcDynToVoid(new A()); /// 02: static type warning + b = funcDynToVoid(new B()); /// 03: static type warning + c = funcDynToVoid(new C()); /// 04: static type warning if (funcDynToVoid is FuncDynToDyn) { // Promotion: FuncDynToDyn << FuncDynToVoid. @@ -87,7 +87,7 @@ testFuncDynToVoid() { if (funcDynToVoid is FuncDynToA) { // Promotion: FuncDynToA << FuncDynToVoid. a = funcDynToVoid(new A()); b = funcDynToVoid(new B()); - c = funcDynToVoid(new C()); //# 05: static type warning + c = funcDynToVoid(new C()); /// 05: static type warning } } @@ -95,19 +95,19 @@ testFuncDynToA() { FuncDynToA funcDynToA = func; a = funcDynToA(new A()); b = funcDynToA(new B()); - c = funcDynToA(new C()); //# 06: static type warning + c = funcDynToA(new C()); /// 06: static type warning if (funcDynToA is FuncDynToDyn) { // No promotion: FuncDynToDyn !<< FuncDynToA. a = funcDynToA(new A()); b = funcDynToA(new B()); - c = funcDynToA(new C()); //# 08: static type warning + c = funcDynToA(new C()); /// 08: static type warning } if (funcDynToA is FuncDynToVoid) { // No promotion: FuncDynToVoid !<< FuncDynToA. a = funcDynToA(new A()); b = funcDynToA(new B()); - c = funcDynToA(new C()); //# 07: static type warning + c = funcDynToA(new C()); /// 07: static type warning } } \ No newline at end of file diff --git a/tests/language/type_promotion_local_test.dart b/tests/language/type_promotion_local_test.dart index 8c3a4c817bd..d16e93f9aac 100644 --- a/tests/language/type_promotion_local_test.dart +++ b/tests/language/type_promotion_local_test.dart @@ -26,134 +26,134 @@ class E implements C, D { void main() { A a = new E(); print(a.a); - print(a.b); //# 01: static type warning - print(a.c); //# 02: static type warning - print(a.d); //# 03: static type warning + print(a.b); /// 01: static type warning + print(a.c); /// 02: static type warning + print(a.d); /// 03: static type warning if (a is B) { print(a.a); print(a.b); - print(a.c); //# 04: static type warning - print(a.d); //# 05: static type warning + print(a.c); /// 04: static type warning + print(a.d); /// 05: static type warning if (a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 06: static type warning + print(a.d); /// 06: static type warning } print(a.a); print(a.b); - print(a.c); //# 07: static type warning - print(a.d); //# 08: static type warning + print(a.c); /// 07: static type warning + print(a.d); /// 08: static type warning } if (a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 09: static type warning + print(a.d); /// 09: static type warning if (a is B) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 10: static type warning + print(a.d); /// 10: static type warning } if (a is D) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 11: static type warning + print(a.d); /// 11: static type warning } print(a.a); print(a.b); print(a.c); - print(a.d); //# 12: static type warning + print(a.d); /// 12: static type warning } print(a.a); - print(a.b); //# 13: static type warning - print(a.c); //# 14: static type warning - print(a.d); //# 15: static type warning + print(a.b); /// 13: static type warning + print(a.c); /// 14: static type warning + print(a.d); /// 15: static type warning if (a is D) { print(a.a); - print(a.b); //# 16: static type warning - print(a.c); //# 17: static type warning + print(a.b); /// 16: static type warning + print(a.c); /// 17: static type warning print(a.d); } print(a.a); - print(a.b); //# 18: static type warning - print(a.c); //# 19: static type warning - print(a.d); //# 20: static type warning + print(a.b); /// 18: static type warning + print(a.c); /// 19: static type warning + print(a.d); /// 20: static type warning var o1 = a is B ? '${a.a}' '${a.b}' - '${a.c}' //# 21: static type warning - '${a.d}' //# 22: static type warning + '${a.c}' /// 21: static type warning + '${a.d}' /// 22: static type warning : '${a.a}' - '${a.b}' //# 23: static type warning - '${a.c}' //# 24: static type warning - '${a.d}' //# 25: static type warning + '${a.b}' /// 23: static type warning + '${a.c}' /// 24: static type warning + '${a.d}' /// 25: static type warning ; var o2 = a is C ? '${a.a}' '${a.b}' '${a.c}' - '${a.d}' //# 26: static type warning + '${a.d}' /// 26: static type warning : '${a.a}' - '${a.b}' //# 27: static type warning - '${a.c}' //# 28: static type warning - '${a.d}' //# 29: static type warning + '${a.b}' /// 27: static type warning + '${a.c}' /// 28: static type warning + '${a.d}' /// 29: static type warning ; var o3 = a is D ? '${a.a}' - '${a.b}' //# 30: static type warning - '${a.c}' //# 31: static type warning + '${a.b}' /// 30: static type warning + '${a.c}' /// 31: static type warning '${a.d}' : '${a.a}' - '${a.b}' //# 32: static type warning - '${a.c}' //# 33: static type warning - '${a.d}' //# 34: static type warning + '${a.b}' /// 32: static type warning + '${a.c}' /// 33: static type warning + '${a.d}' /// 34: static type warning ; if (a is B && a is B) { print(a.a); print(a.b); - print(a.c); //# 35: static type warning - print(a.d); //# 36: static type warning + print(a.c); /// 35: static type warning + print(a.d); /// 36: static type warning } if (a is B && a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 37: static type warning + print(a.d); /// 37: static type warning } if (a is C && a is B) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 38: static type warning + print(a.d); /// 38: static type warning } if (a is C && a is D) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 39: static type warning + print(a.d); /// 39: static type warning } if (a is D && a is C) { print(a.a); - print(a.b); //# 40: static type warning - print(a.c); //# 41: static type warning + print(a.b); /// 40: static type warning + print(a.c); /// 41: static type warning print(a.d); } } diff --git a/tests/language/type_promotion_logical_and_test.dart b/tests/language/type_promotion_logical_and_test.dart index eaf29150218..1ee62960607 100644 --- a/tests/language/type_promotion_logical_and_test.dart +++ b/tests/language/type_promotion_logical_and_test.dart @@ -27,14 +27,14 @@ void main() { A a = new E(); var b; if (a is D && ((a = new D()) != null)) { - b = a.d; //# 01: static type warning + b = a.d; /// 01: static type warning } if (a is D && (b = a.d)) { - b = a.d; //# 02: static type warning + b = a.d; /// 02: static type warning a = null; } if ((((a) is D) && (b = (a).d))) { - b = a.d; //# 03: static type warning + b = a.d; /// 03: static type warning a = null; } if (f(a = null) && a is D) { diff --git a/tests/language/type_promotion_more_specific_test.dart b/tests/language/type_promotion_more_specific_test.dart index 2d47f6b3eed..eb843b6f3a5 100644 --- a/tests/language/type_promotion_more_specific_test.dart +++ b/tests/language/type_promotion_more_specific_test.dart @@ -39,17 +39,17 @@ void testInterface() { A a = new B(); if (a is B) { // Promotion B << A. - x = a.b; //# 01: ok + x = a.b; /// 01: ok } if (a is C) { // No promotion C !<< A. - x = a.c; //# 02: static type warning + x = a.c; /// 02: static type warning } B b = new B(); if (b is A) { // No promotion B !<< A. - x = b.b; //# 03: ok + x = b.b; /// 03: ok } if (x is A) { // No promotion A !<< dynamic. - y = x.b; //# 04: ok + y = x.b; /// 04: ok } } @@ -59,24 +59,24 @@ testGeneric() { D d1 = new E(null); if (d1 is E) { // Promotion: E << D. - x = d1.e; //# 05: ok + x = d1.e; /// 05: ok } if (d1 is E) { // Promotion: E << D. - int a = d1.d; //# 06: static type warning - String b = d1.d; //# 07: static type warning - x = d1.e; //# 08: ok + int a = d1.d; /// 06: static type warning + String b = d1.d; /// 07: static type warning + x = d1.e; /// 08: ok } D d2 = new E(null); if (d2 is E) { // No promotion: E !<< D - x = d2.e; //# 09: static type warning - int a = d2.e; //# 10: static type warning - String b = d2.e; //# 11: static type warning + x = d2.e; /// 09: static type warning + int a = d2.e; /// 10: static type warning + String b = d2.e; /// 11: static type warning } D d3 = new E(new B()); if (d3 is E) { // Promotion: E << D - x = d3.d.b; //# 12: ok - x = d3.e.b; //# 13: ok + x = d3.d.b; /// 12: ok + x = d3.e.b; /// 13: ok } } diff --git a/tests/language/type_promotion_multiple_test.dart b/tests/language/type_promotion_multiple_test.dart index d376f467cef..f692916c722 100644 --- a/tests/language/type_promotion_multiple_test.dart +++ b/tests/language/type_promotion_multiple_test.dart @@ -29,68 +29,68 @@ void main() { void test(A a1) { A a2 = new E(); print(a1.a); - print(a1.b); //# 01: static type warning - print(a1.c); //# 02: static type warning - print(a1.d); //# 03: static type warning + print(a1.b); /// 01: static type warning + print(a1.c); /// 02: static type warning + print(a1.d); /// 03: static type warning print(a2.a); - print(a2.b); //# 04: static type warning - print(a2.c); //# 05: static type warning - print(a2.d); //# 06: static type warning + print(a2.b); /// 04: static type warning + print(a2.c); /// 05: static type warning + print(a2.d); /// 06: static type warning if (a1 is B && a2 is C) { print(a1.a); print(a1.b); - print(a1.c); //# 07: static type warning - print(a1.d); //# 08: static type warning + print(a1.c); /// 07: static type warning + print(a1.d); /// 08: static type warning print(a2.a); print(a2.b); print(a2.c); - print(a2.d); //# 09: static type warning + print(a2.d); /// 09: static type warning if (a1 is C && a2 is D) { print(a1.a); print(a1.b); print(a1.c); - print(a1.d); //# 10: static type warning + print(a1.d); /// 10: static type warning print(a2.a); print(a2.b); print(a2.c); - print(a2.d); //# 11: static type warning + print(a2.d); /// 11: static type warning } } var o1 = a1 is B && a2 is C ? '${a1.a}' '${a1.b}' - '${a1.c}' //# 12: static type warning - '${a1.d}' //# 13: static type warning + '${a1.c}' /// 12: static type warning + '${a1.d}' /// 13: static type warning '${a2.a}' '${a2.b}' '${a2.c}' - '${a2.d}' //# 14: static type warning + '${a2.d}' /// 14: static type warning : '${a1.a}' - '${a1.b}' //# 15: static type warning - '${a1.c}' //# 16: static type warning - '${a1.d}' //# 17: static type warning + '${a1.b}' /// 15: static type warning + '${a1.c}' /// 16: static type warning + '${a1.d}' /// 17: static type warning '${a2.a}' - '${a2.b}' //# 18: static type warning - '${a2.c}' //# 19: static type warning - '${a2.d}' //# 20: static type warning + '${a2.b}' /// 18: static type warning + '${a2.c}' /// 19: static type warning + '${a2.d}' /// 20: static type warning ; if (a2 is C && a1 is B && a1 is C && a2 is B && a2 is D) { print(a1.a); print(a1.b); print(a1.c); - print(a1.d); //# 21: static type warning + print(a1.d); /// 21: static type warning print(a2.a); print(a2.b); print(a2.c); - print(a2.d); //# 22: static type warning + print(a2.d); /// 22: static type warning } } diff --git a/tests/language/type_promotion_parameter_test.dart b/tests/language/type_promotion_parameter_test.dart index 8672dc875f5..fd07e2cbd0f 100644 --- a/tests/language/type_promotion_parameter_test.dart +++ b/tests/language/type_promotion_parameter_test.dart @@ -28,176 +28,176 @@ void main() { } void test(A a) { print(a.a); - print(a.b); //# 01: static type warning - print(a.c); //# 02: static type warning - print(a.d); //# 03: static type warning + print(a.b); /// 01: static type warning + print(a.c); /// 02: static type warning + print(a.d); /// 03: static type warning if (a is B) { print(a.a); print(a.b); - print(a.c); //# 04: static type warning - print(a.d); //# 05: static type warning + print(a.c); /// 04: static type warning + print(a.d); /// 05: static type warning if (a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 06: static type warning + print(a.d); /// 06: static type warning } print(a.a); print(a.b); - print(a.c); //# 07: static type warning - print(a.d); //# 08: static type warning + print(a.c); /// 07: static type warning + print(a.d); /// 08: static type warning } if (a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 09: static type warning + print(a.d); /// 09: static type warning if (a is B) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 10: static type warning + print(a.d); /// 10: static type warning } if (a is D) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 11: static type warning + print(a.d); /// 11: static type warning } print(a.a); print(a.b); print(a.c); - print(a.d); //# 12: static type warning + print(a.d); /// 12: static type warning } print(a.a); - print(a.b); //# 13: static type warning - print(a.c); //# 14: static type warning - print(a.d); //# 15: static type warning + print(a.b); /// 13: static type warning + print(a.c); /// 14: static type warning + print(a.d); /// 15: static type warning if (a is D) { print(a.a); - print(a.b); //# 16: static type warning - print(a.c); //# 17: static type warning + print(a.b); /// 16: static type warning + print(a.c); /// 17: static type warning print(a.d); } print(a.a); - print(a.b); //# 18: static type warning - print(a.c); //# 19: static type warning - print(a.d); //# 20: static type warning + print(a.b); /// 18: static type warning + print(a.c); /// 19: static type warning + print(a.d); /// 20: static type warning var o1 = a is B ? '${a.a}' '${a.b}' - '${a.c}' //# 21: static type warning - '${a.d}' //# 22: static type warning + '${a.c}' /// 21: static type warning + '${a.d}' /// 22: static type warning : '${a.a}' - '${a.b}' //# 23: static type warning - '${a.c}' //# 24: static type warning - '${a.d}' //# 25: static type warning + '${a.b}' /// 23: static type warning + '${a.c}' /// 24: static type warning + '${a.d}' /// 25: static type warning ; var o2 = a is C ? '${a.a}' '${a.b}' '${a.c}' - '${a.d}' //# 26: static type warning + '${a.d}' /// 26: static type warning : '${a.a}' - '${a.b}' //# 27: static type warning - '${a.c}' //# 28: static type warning - '${a.d}' //# 29: static type warning + '${a.b}' /// 27: static type warning + '${a.c}' /// 28: static type warning + '${a.d}' /// 29: static type warning ; var o3 = a is D ? '${a.a}' - '${a.b}' //# 30: static type warning - '${a.c}' //# 31: static type warning + '${a.b}' /// 30: static type warning + '${a.c}' /// 31: static type warning '${a.d}' : '${a.a}' - '${a.b}' //# 32: static type warning - '${a.c}' //# 33: static type warning - '${a.d}' //# 34: static type warning + '${a.b}' /// 32: static type warning + '${a.c}' /// 33: static type warning + '${a.d}' /// 34: static type warning ; if (a is B && a is B) { print(a.a); print(a.b); - print(a.c); //# 35: static type warning - print(a.d); //# 36: static type warning + print(a.c); /// 35: static type warning + print(a.d); /// 36: static type warning } if (a is B && a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 37: static type warning + print(a.d); /// 37: static type warning } if (a is C && a is B) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 38: static type warning + print(a.d); /// 38: static type warning } if (a is C && a is D) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 39: static type warning + print(a.d); /// 39: static type warning } if (a is D && a is C) { print(a.a); - print(a.b); //# 40: static type warning - print(a.c); //# 41: static type warning + print(a.b); /// 40: static type warning + print(a.c); /// 41: static type warning print(a.d); } if (a is D && a.a == "" - && a.b == "" // //# 42: static type warning - && a.c == "" // //# 43: static type warning + && a.b == "" // /// 42: static type warning + && a.c == "" // /// 43: static type warning && a.d == "") { print(a.a); - print(a.b); //# 44: static type warning - print(a.c); //# 45: static type warning + print(a.b); /// 44: static type warning + print(a.c); /// 45: static type warning print(a.d); } if (a.a == "" - && a.b == "" //# 46: static type warning - && a.c == "" //# 47: static type warning - && a.d == "" //# 48: static type warning + && a.b == "" /// 46: static type warning + && a.c == "" /// 47: static type warning + && a.d == "" /// 48: static type warning && a is B && a.a == "" && a.b == "" - && a.c == "" //# 49: static type warning - && a.d == "" //# 50: static type warning + && a.c == "" /// 49: static type warning + && a.d == "" /// 50: static type warning && a is C && a.a == "" && a.b == "" && a.c == "" - && a.d == "" //# 51: static type warning + && a.d == "" /// 51: static type warning ) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 52: static type warning + print(a.d); /// 52: static type warning } if ((a is B)) { print(a.a); print(a.b); - print(a.c); //# 54: static type warning - print(a.d); //# 55: static type warning + print(a.c); /// 54: static type warning + print(a.d); /// 55: static type warning } if ((a is B && (a) is C) && a is B) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 56: static type warning + print(a.d); /// 56: static type warning } } diff --git a/tests/language/type_variable_bounds2_test.dart b/tests/language/type_variable_bounds2_test.dart index 5d452fb59f9..9fd3894b20f 100644 --- a/tests/language/type_variable_bounds2_test.dart +++ b/tests/language/type_variable_bounds2_test.dart @@ -11,13 +11,13 @@ abstract class J { } abstract class K { } abstract class I { } class A implements I, J { @@ -27,21 +27,21 @@ main() { var a = new A(); { - I i = a; // //# 00: dynamic type error, static type warning - J j = a; // //# 01: static type warning - K k = a; // //# 02: dynamic type error, static type warning + I i = a; // /// 00: dynamic type error, static type warning + J j = a; // /// 01: static type warning + K k = a; // /// 02: dynamic type error, static type warning // In production mode, A is subtype of I, error in checked mode. - var x = a is I; // //# 03: dynamic type error, static type warning + var x = a is I; // /// 03: dynamic type error, static type warning // In both production and checked modes, A is a subtype of J. - Expect.isTrue(a is J); // //# 04: static type warning + Expect.isTrue(a is J); // /// 04: static type warning // In both production and checked modes, A is not a subtype of K. // However, while unsuccessfully trying to prove that A is a K, // a malformed type is encountered in checked mode, resulting in a dynamic // type error. - Expect.isTrue(a is !K); // //# 05: dynamic type error, static type warning + Expect.isTrue(a is !K); // /// 05: dynamic type error, static type warning } a = new A(); @@ -49,7 +49,7 @@ main() { { I i = a; J j = a; - K k = a; // //# 06: dynamic type error, static type warning + K k = a; // /// 06: dynamic type error, static type warning // In both production and checked modes, A is a subtype of I. Expect.isTrue(a is I); diff --git a/tests/language/type_variable_bounds3_test.dart b/tests/language/type_variable_bounds3_test.dart index aeef48151cb..405c4a74030 100644 --- a/tests/language/type_variable_bounds3_test.dart +++ b/tests/language/type_variable_bounds3_test.dart @@ -9,7 +9,7 @@ class A { class B { foo(x) { - return x is A; // //# 00: dynamic type error, static type warning + return x is A; // /// 00: dynamic type error, static type warning } } diff --git a/tests/language/type_variable_bounds4_test.dart b/tests/language/type_variable_bounds4_test.dart index 1275310dec3..3581d6f5780 100644 --- a/tests/language/type_variable_bounds4_test.dart +++ b/tests/language/type_variable_bounds4_test.dart @@ -5,22 +5,22 @@ // Test instantiation of object with malbounded types. class A {} class B implements A {} class C implements B {} class Class { newA() { - new A(); //# 01: continued + new A(); /// 01: continued } newB() { - new B(); //# 01: continued + new B(); /// 01: continued } newC() { - new C(); //# 01: continued + new C(); /// 01: continued } } @@ -53,9 +53,9 @@ void main() { test(false, () => new B()); test(false, () => new C()); - test(true, () => new A()); //# 01: continued - test(true, () => new B()); //# 01: continued - test(true, () => new C()); //# 01: continued + test(true, () => new A()); /// 01: continued + test(true, () => new B()); /// 01: continued + test(true, () => new C()); /// 01: continued var c = new Class(); test(false, () => c.newA()); @@ -63,7 +63,7 @@ void main() { test(false, () => c.newC()); c = new Class(); - test(true, () => c.newA()); //# 01: continued - test(true, () => c.newB()); //# 01: continued - test(true, () => c.newC()); //# 01: continued + test(true, () => c.newA()); /// 01: continued + test(true, () => c.newB()); /// 01: continued + test(true, () => c.newC()); /// 01: continued } \ No newline at end of file diff --git a/tests/language/type_variable_bounds_test.dart b/tests/language/type_variable_bounds_test.dart index 7696d489aab..5cc03a97e36 100644 --- a/tests/language/type_variable_bounds_test.dart +++ b/tests/language/type_variable_bounds_test.dart @@ -7,7 +7,7 @@ class Foo { Foo(); - factory Foo.bad() = XFoo; // //# 00: static type warning + factory Foo.bad() = XFoo; // /// 00: static type warning factory Foo.good() = Foo; @@ -20,7 +20,7 @@ abstract class IFoo { // String is not assignable to num. class Baz - extends Foo //# 01: static type warning, dynamic type error + extends Foo /// 01: static type warning, dynamic type error {} class Biz extends Foo {} @@ -29,26 +29,26 @@ Foo fi; // String is not assignable to num. Foo - //# 02: static type warning, dynamic type error + /// 02: static type warning, dynamic type error fs; class Box { // Box.T is not assignable to num. - Foo t; //# 03: static type warning + Foo t; /// 03: static type warning makeFoo() { // Box.T is not assignable to num. - return new Foo(); //# 04: static type warning, dynamic type error + return new Foo(); /// 04: static type warning, dynamic type error } } main() { // String is not assignable to num. - var v1 = new Foo(); //# 05: static type warning, dynamic type error + var v1 = new Foo(); /// 05: static type warning, dynamic type error // String is not assignable to num. - Foo v2 = null; //# 06: static type warning + Foo v2 = null; /// 06: static type warning new Baz(); new Biz(); @@ -61,14 +61,14 @@ main() { new Box().makeFoo(); // Fisk does not exist. - new Box(); //# 07: static type warning + new Box(); /// 07: static type warning // Too many type arguments. - new Box(); //# 08: static type warning + new Box(); /// 08: static type warning // Fisk does not exist. - Box box = null; //# 09: static type warning + Box box = null; /// 09: static type warning // Too many type arguments. - Box box = null; //# 10: static type warning + Box box = null; /// 10: static type warning } diff --git a/tests/language/type_variable_conflict2_test.dart b/tests/language/type_variable_conflict2_test.dart index b9a64d883c6..a0af730a082 100644 --- a/tests/language/type_variable_conflict2_test.dart +++ b/tests/language/type_variable_conflict2_test.dart @@ -13,45 +13,45 @@ class C { } // Class 'C' has no instance method 'T': call noSuchMethod. - foo() => T(); // //# 01: static type warning + foo() => T(); // /// 01: static type warning // T is in scope, even in static context. Compile-time error to call this.T(). - static bar() => T(); // //# 02: compile-time error + static bar() => T(); // /// 02: compile-time error // X is not in scope. NoSuchMethodError. - static baz() => X(); // //# 03: static type warning + static baz() => X(); // /// 03: static type warning // Class 'C' has no static method 'T': NoSuchMethodError. - static qux() => C.T(); // //# 04: static type warning + static qux() => C.T(); // /// 04: static type warning // Class '_Type' has no instance method 'call': NoSuchMethodError. - quux() => (T)(); // //# 05: static type warning + quux() => (T)(); // /// 05: static type warning // Runtime type T not accessible from static context. Compile-time error. - static corge() => (T)(); // //# 06: compile-time error + static corge() => (T)(); // /// 06: compile-time error // Class '_Type' has no [] operator: NoSuchMethodError. - grault() => T[0]; // //# 07: static type warning + grault() => T[0]; // /// 07: static type warning // Runtime type T not accessible from static context. Compile-time error. - static garply() => T[0]; // //# 08: compile-time error + static garply() => T[0]; // /// 08: compile-time error // Class '_Type' has no member m: NoSuchMethodError. - waldo() => T.m; // //# 09: static type warning + waldo() => T.m; // /// 09: static type warning // Runtime type T not accessible from static context. Compile-time error. - static fred() => T.m; // //# 10: compile-time error + static fred() => T.m; // /// 10: compile-time error } main() { - Expect.equals(42, new C().foo()); // //# 01: continued - C.bar(); // //# 02: continued - Expect.throws(() => C.baz(), (e) => e is NoSuchMethodError); // //# 03: continued - Expect.throws(() => C.qux(), (e) => e is NoSuchMethodError); // //# 04: continued - Expect.throws(() => new C().quux(), (e) => e is NoSuchMethodError); // //# 05: continued - C.corge(); // //# 06: continued - Expect.throws(() => new C().grault(), (e) => e is NoSuchMethodError); // //# 07: continued - C.garply(); // //# 08: continued - Expect.throws(() => new C().waldo(), (e) => e is NoSuchMethodError); // //# 09: continued - C.fred(); // //# 10: continued + Expect.equals(42, new C().foo()); // /// 01: continued + C.bar(); // /// 02: continued + Expect.throws(() => C.baz(), (e) => e is NoSuchMethodError); // /// 03: continued + Expect.throws(() => C.qux(), (e) => e is NoSuchMethodError); // /// 04: continued + Expect.throws(() => new C().quux(), (e) => e is NoSuchMethodError); // /// 05: continued + C.corge(); // /// 06: continued + Expect.throws(() => new C().grault(), (e) => e is NoSuchMethodError); // /// 07: continued + C.garply(); // /// 08: continued + Expect.throws(() => new C().waldo(), (e) => e is NoSuchMethodError); // /// 09: continued + C.fred(); // /// 10: continued } diff --git a/tests/language/type_variable_conflict_test.dart b/tests/language/type_variable_conflict_test.dart index 8cb3cb14ee0..1453f4292e9 100644 --- a/tests/language/type_variable_conflict_test.dart +++ b/tests/language/type_variable_conflict_test.dart @@ -8,22 +8,22 @@ import "package:expect/expect.dart"; class G1 { - var T; // //# 01: compile-time error + var T; // /// 01: compile-time error } class G2 { - get T {} // //# 02: compile-time error + get T {} // /// 02: compile-time error } class G3 { - T() {} // //# 03: compile-time error + T() {} // /// 03: compile-time error } class G4 { - static var T; // //# 04: compile-time error + static var T; // /// 04: compile-time error } class G5 { - static get T {} // //# 05: compile-time error + static get T {} // /// 05: compile-time error } class G6 { - static T() {} // //# 06: compile-time error + static T() {} // /// 06: compile-time error } main() { diff --git a/tests/language/type_variable_scope3_test.dart b/tests/language/type_variable_scope3_test.dart index 99f04d48f8a..262131aa084 100644 --- a/tests/language/type_variable_scope3_test.dart +++ b/tests/language/type_variable_scope3_test.dart @@ -5,12 +5,12 @@ // Test that a type parameter cannot be repeated. class Foo { } main() { new Foo(); } diff --git a/tests/language/type_variable_scope_test.dart b/tests/language/type_variable_scope_test.dart index 04ee6eace2a..cfc770d80a0 100644 --- a/tests/language/type_variable_scope_test.dart +++ b/tests/language/type_variable_scope_test.dart @@ -8,11 +8,11 @@ class Foo { Foo() { } static - Foo //# 00: static type warning + Foo /// 00: static type warning m( - Foo //# 01: static type warning + Foo /// 01: static type warning f) { - Foo x = new Foo(); //# 02: static type warning + Foo x = new Foo(); /// 02: static type warning return new Foo(); } @@ -22,14 +22,14 @@ class Foo { } // T is not in scope for a static field. - static Foo f1; //# 03: static type warning + static Foo f1; /// 03: static type warning static - Foo //# 04: static type warning + Foo /// 04: static type warning get f { return new Foo(); } static void set f( - Foo //# 05: static type warning + Foo /// 05: static type warning value) {} } @@ -40,7 +40,7 @@ abstract class I { main() { Foo.m(new Foo()); new I(new Foo()); - Foo.f1 = new Foo(); //# 03: continued + Foo.f1 = new Foo(); /// 03: continued var x = Foo.f; Foo.f = x; } diff --git a/tests/language/typevariable_substitution2_test.dart b/tests/language/typevariable_substitution2_test.dart index 3a7149e3577..dffa91397c4 100644 --- a/tests/language/typevariable_substitution2_test.dart +++ b/tests/language/typevariable_substitution2_test.dart @@ -21,6 +21,6 @@ class C = B with M; main() { new A(null); - new C(''); //# 01: ok - checkDynamicTypeError(() => new C(0)); //# 02: static type warning + new C(''); /// 01: ok + checkDynamicTypeError(() => new C(0)); /// 02: static type warning } diff --git a/tests/language/unbalanced_brace_test.dart b/tests/language/unbalanced_brace_test.dart index d474d235c3a..29bf073bf03 100644 --- a/tests/language/unbalanced_brace_test.dart +++ b/tests/language/unbalanced_brace_test.dart @@ -6,11 +6,11 @@ class A { m() { - /* //# 01: compile-time error + /* /// 01: compile-time error } // */ -/* //# 02: compile-time error +/* /// 02: compile-time error } // */ diff --git a/tests/language/unresolved_default_constructor_test.dart b/tests/language/unresolved_default_constructor_test.dart index 82a33907319..3adbdd935c9 100644 --- a/tests/language/unresolved_default_constructor_test.dart +++ b/tests/language/unresolved_default_constructor_test.dart @@ -14,5 +14,5 @@ class A { main() { A.method(); - Expect.throws(() => new A()); //# 01: static type warning + Expect.throws(() => new A()); /// 01: static type warning } \ No newline at end of file diff --git a/tests/language/unsigned_right_shift_test.dart b/tests/language/unsigned_right_shift_test.dart index d4ee9f20284..0b5d197f151 100644 --- a/tests/language/unsigned_right_shift_test.dart +++ b/tests/language/unsigned_right_shift_test.dart @@ -6,7 +6,7 @@ main() { var foo = -10 - >>> 1 //# 01: compile-time error + >>> 1 /// 01: compile-time error ; - foo >>>= 1; //# 02: compile-time error + foo >>>= 1; /// 02: compile-time error } diff --git a/tests/language/unsupported_operators_test.dart b/tests/language/unsupported_operators_test.dart index d5ba5ebae93..a80987f11e2 100644 --- a/tests/language/unsupported_operators_test.dart +++ b/tests/language/unsupported_operators_test.dart @@ -9,10 +9,10 @@ library unsupported_operators; class C { m() { print( - super === //# 01: compile-time error + super === /// 01: compile-time error null); print( - super !== //# 02: compile-time error + super !== /// 02: compile-time error null); } } @@ -21,9 +21,9 @@ void main() { new C().m(); new C().m(); print( - "foo" === //# 03: compile-time error + "foo" === /// 03: compile-time error null); print( - "foo" !== //# 04: compile-time error + "foo" !== /// 04: compile-time error null); } \ No newline at end of file diff --git a/tests/language/variable_declaration_metadata_test.dart b/tests/language/variable_declaration_metadata_test.dart index bf60099ba00..7e0a6bd6b1a 100644 --- a/tests/language/variable_declaration_metadata_test.dart +++ b/tests/language/variable_declaration_metadata_test.dart @@ -8,28 +8,28 @@ const annotation = null; var - @annotation //# 01: compile-time error + @annotation /// 01: compile-time error v1, - @annotation //# 02: compile-time error + @annotation /// 02: compile-time error v2; int - @annotation //# 03: compile-time error + @annotation /// 03: compile-time error v3, - @annotation //# 04: compile-time error + @annotation /// 04: compile-time error v4; class C { var - @annotation //# 05: compile-time error + @annotation /// 05: compile-time error f1, - @annotation //# 06: compile-time error + @annotation /// 06: compile-time error f2; int - @annotation //# 07: compile-time error + @annotation /// 07: compile-time error f3, - @annotation //# 08: compile-time error + @annotation /// 08: compile-time error f4; } @@ -48,15 +48,15 @@ main() { use(c.f4); var - @annotation //# 09: compile-time error + @annotation /// 09: compile-time error l1, - @annotation //# 10: compile-time error + @annotation /// 10: compile-time error l2; int - @annotation //# 11: compile-time error + @annotation /// 11: compile-time error l3, - @annotation //# 12: compile-time error + @annotation /// 12: compile-time error l4; use(l1); @@ -65,9 +65,9 @@ main() { use(l4); for (var - @annotation //# 13: compile-time error + @annotation /// 13: compile-time error i1 = 0, - @annotation //# 14: compile-time error + @annotation /// 14: compile-time error i2 = 0; ; ) { use(i1); use(i2); @@ -75,9 +75,9 @@ main() { } for (int - @annotation //# 15: compile-time error + @annotation /// 15: compile-time error i3 = 0, - @annotation //# 16: compile-time error + @annotation /// 16: compile-time error i4 = 0; ; ) { use(i3); use(i4); diff --git a/tests/language/vm/debug_break_enabled_vm_test.dart b/tests/language/vm/debug_break_enabled_vm_test.dart index a0e0c59a0c8..df915947e01 100644 --- a/tests/language/vm/debug_break_enabled_vm_test.dart +++ b/tests/language/vm/debug_break_enabled_vm_test.dart @@ -12,7 +12,7 @@ test(i) { // "crash" is not an allowed outcome specifier. // Use "ok" instead and mark the status file with "Crash, OK". if (i == 18) { - break "hit"; // //# 01: ok + break "hit"; // /// 01: ok } } diff --git a/tests/language/vm/debug_break_vm_test.dart b/tests/language/vm/debug_break_vm_test.dart index f944e8397f3..379dd00f490 100644 --- a/tests/language/vm/debug_break_vm_test.dart +++ b/tests/language/vm/debug_break_vm_test.dart @@ -5,16 +5,16 @@ // A debug break is not valid Dart syntax unless --enable-debug-break. test(i) { - break "outside_loop"; // //# 02: compile-time error + break "outside_loop"; // /// 02: compile-time error do { if (i > 15) { - break "inside_loop"; // //# 03: compile-time error + break "inside_loop"; // /// 03: compile-time error } } while (false); } void main() { - break "gdb"; // //# 01: compile-time error + break "gdb"; // /// 01: compile-time error for (var i = 0; i < 20; i++) { test(i); } diff --git a/tests/language/wrong_number_type_arguments_test.dart b/tests/language/wrong_number_type_arguments_test.dart index bc1da329723..4cfa40bf5b9 100644 --- a/tests/language/wrong_number_type_arguments_test.dart +++ b/tests/language/wrong_number_type_arguments_test.dart @@ -6,16 +6,16 @@ import "package:expect/expect.dart"; // Map takes 2 type arguments. Map - //# 00: static type warning + /// 00: static type warning foo; Map - //# 02: static type warning + /// 02: static type warning baz; main() { foo = null; var bar = new Map - //# 01: static type warning + /// 01: static type warning (); - baz = new Map(); //# 02: continued + baz = new Map(); /// 02: continued } diff --git a/tests/language_strong/abstract_exact_selector_test.dart b/tests/language_strong/abstract_exact_selector_test.dart index fa4e48b365c..8932dc31906 100644 --- a/tests/language_strong/abstract_exact_selector_test.dart +++ b/tests/language_strong/abstract_exact_selector_test.dart @@ -8,7 +8,7 @@ import "package:expect/expect.dart"; import "compiler_annotations.dart"; -abstract //# 01: static type warning +abstract /// 01: static type warning class Foo { noSuchMethod(im) => 42; } diff --git a/tests/language_strong/abstract_factory_constructor_test.dart b/tests/language_strong/abstract_factory_constructor_test.dart index ec7a3599b10..af955529864 100644 --- a/tests/language_strong/abstract_factory_constructor_test.dart +++ b/tests/language_strong/abstract_factory_constructor_test.dart @@ -19,11 +19,11 @@ abstract class A1 { class A2 { // Intentionally abstract method. - method(); // //# 00: static type warning + method(); // /// 00: static type warning A2.make() {} } main() { new A1.make(); - new A2.make(); // //# 00: continued + new A2.make(); // /// 00: continued } diff --git a/tests/language_strong/abstract_getter_test.dart b/tests/language_strong/abstract_getter_test.dart index 32174f2b016..964cf80609a 100644 --- a/tests/language_strong/abstract_getter_test.dart +++ b/tests/language_strong/abstract_getter_test.dart @@ -8,7 +8,7 @@ import "package:expect/expect.dart"; class Foo { // Intentionally abstract: - get i; // //# 01: static type warning + get i; // /// 01: static type warning } class Bar { @@ -17,9 +17,9 @@ class Bar { noMethod(e) => e is NoSuchMethodError; checkIt(f) { - Expect.throws(() { f.i = 'hi'; }, noMethod); // //# 01: continued - Expect.throws(() { print(f.i); }, noMethod); // //# 01: continued - Expect.throws(() { print(f.i()); }, noMethod); // //# 01: continued + Expect.throws(() { f.i = 'hi'; }, noMethod); // /// 01: continued + Expect.throws(() { print(f.i); }, noMethod); // /// 01: continued + Expect.throws(() { print(f.i()); }, noMethod); // /// 01: continued } main() { diff --git a/tests/language_strong/abstract_runtime_error_test.dart b/tests/language_strong/abstract_runtime_error_test.dart index d8cafe51e47..62cf3f7ebdb 100644 --- a/tests/language_strong/abstract_runtime_error_test.dart +++ b/tests/language_strong/abstract_runtime_error_test.dart @@ -12,7 +12,7 @@ import "package:expect/expect.dart"; abstract class Interface { - void foo(); //# 03: static type warning + void foo(); /// 03: static type warning } abstract class AbstractClass { @@ -27,19 +27,19 @@ class NonAbstractClass implements Interface { toString() => 'NonAbstractClass'; } -Interface interface() => new Interface(); //# 01: static type warning +Interface interface() => new Interface(); /// 01: static type warning -AbstractClass abstractClass() => new AbstractClass(); //# 02: static type warning +AbstractClass abstractClass() => new AbstractClass(); /// 02: static type warning bool isAbstractClassInstantiationError(e) { return e is AbstractClassInstantiationError; } void main() { - Expect.throws(interface, isAbstractClassInstantiationError, //# 01: continued - "expected AbstractClassInstantiationError"); // //# 01: continued - Expect.throws(abstractClass, isAbstractClassInstantiationError, //# 02: continued - "expected AbstractClassInstantiationError"); // //# 02: continued + Expect.throws(interface, isAbstractClassInstantiationError, /// 01: continued + "expected AbstractClassInstantiationError"); // /// 01: continued + Expect.throws(abstractClass, isAbstractClassInstantiationError, /// 02: continued + "expected AbstractClassInstantiationError"); // /// 02: continued Expect.stringEquals('ConcreteSubclass', '${new ConcreteSubclass()}'); Expect.stringEquals('NonAbstractClass', '${new NonAbstractClass()}'); } diff --git a/tests/language_strong/abstract_syntax_test.dart b/tests/language_strong/abstract_syntax_test.dart index dda5c64985f..f949ff320b2 100644 --- a/tests/language_strong/abstract_syntax_test.dart +++ b/tests/language_strong/abstract_syntax_test.dart @@ -10,8 +10,8 @@ main() { } class A { - foo(); // //# 00: static type warning - static bar(); // //# 01: compile-time error + foo(); // /// 00: static type warning + static bar(); // /// 01: compile-time error } class B extends A { diff --git a/tests/language_strong/argument_definition_test.dart b/tests/language_strong/argument_definition_test.dart index 29756096585..1acdb51c312 100644 --- a/tests/language_strong/argument_definition_test.dart +++ b/tests/language_strong/argument_definition_test.dart @@ -7,7 +7,7 @@ import "package:expect/expect.dart"; int test(a, {b, c}) { - if (?b) return b; // //# 01: compile-time error + if (?b) return b; // /// 01: compile-time error return a + b + c; } diff --git a/tests/language_strong/assign_static_type_test.dart b/tests/language_strong/assign_static_type_test.dart index 4f14c1ae87a..00f50d0b446 100644 --- a/tests/language_strong/assign_static_type_test.dart +++ b/tests/language_strong/assign_static_type_test.dart @@ -5,28 +5,28 @@ // This test insures that statically initialized variables, fields, and parameters // report static type warnings. -int a = "String"; // //# 01: static type warning, dynamic type error +int a = "String"; // /// 01: static type warning, dynamic type error class A { - static const int c = "String"; //# 02: static type warning, checked mode compile-time error - final int d = "String"; //# 03: static type warning, dynamic type error - int e = "String"; //# 04: static type warning, dynamic type error + static const int c = "String"; /// 02: static type warning, checked mode compile-time error + final int d = "String"; /// 03: static type warning, dynamic type error + int e = "String"; /// 04: static type warning, dynamic type error A() { - int f = "String"; //# 05: static type warning, dynamic type error + int f = "String"; /// 05: static type warning, dynamic type error } method([ - int // //# 06: static type warning + int // /// 06: static type warning g = "String"]) { return g; } } int main() { - var w = a; //# 01: continued + var w = a; /// 01: continued var x; - x = A.c; // //# 02: continued + x = A.c; // /// 02: continued var v = new A(); - x = v.d; // //# 03: continued - x = v.e; // //# 04: continued - x = v.method(1); //# 06: continued + x = v.d; // /// 03: continued + x = v.e; // /// 04: continued + x = v.method(1); /// 06: continued } diff --git a/tests/language_strong/assign_to_type_test.dart b/tests/language_strong/assign_to_type_test.dart index 7ecd74b09f4..97da693b6eb 100644 --- a/tests/language_strong/assign_to_type_test.dart +++ b/tests/language_strong/assign_to_type_test.dart @@ -11,7 +11,7 @@ noMethod(e) => e is NoSuchMethodError; class C { f() { - Expect.throws(() => T = null, noMethod); //# 01: static type warning + Expect.throws(() => T = null, noMethod); /// 01: static type warning } } @@ -23,7 +23,7 @@ typedef void F(); main() { new C().f(); - Expect.throws(() => D = null, noMethod); //# 02: static type warning - Expect.throws(() => E = null, noMethod); //# 03: static type warning - Expect.throws(() => F = null, noMethod); //# 04: static type warning + Expect.throws(() => D = null, noMethod); /// 02: static type warning + Expect.throws(() => E = null, noMethod); /// 03: static type warning + Expect.throws(() => F = null, noMethod); /// 04: static type warning } diff --git a/tests/language_strong/assign_top_method_test.dart b/tests/language_strong/assign_top_method_test.dart index 2fc8dd79cee..32162b61728 100644 --- a/tests/language_strong/assign_top_method_test.dart +++ b/tests/language_strong/assign_top_method_test.dart @@ -8,6 +8,6 @@ method() { return 0; } main() { // Illegal, can't change a top level method - Expect.throws(() { method = () { return 1; }; }, //# 01: static type warning - (e) => e is NoSuchMethodError); // //# 01: continued + Expect.throws(() { method = () { return 1; }; }, /// 01: static type warning + (e) => e is NoSuchMethodError); // /// 01: continued } diff --git a/tests/language_strong/assignable_expression_test.dart b/tests/language_strong/assignable_expression_test.dart index e192712ed3f..b5ed9fe4244 100644 --- a/tests/language_strong/assignable_expression_test.dart +++ b/tests/language_strong/assignable_expression_test.dart @@ -13,32 +13,32 @@ var tl_static_var = 0; main() { tl_static_var = 0; - (tl_static_var) = 0; // //# 01: compile-time error - (tl_static_var)++; // //# 02: compile-time error - ++(tl_static_var); // //# 03: compile-time error + (tl_static_var) = 0; // /// 01: compile-time error + (tl_static_var)++; // /// 02: compile-time error + ++(tl_static_var); // /// 03: compile-time error C.static_field = 0; - (C.static_field) = 0; // //# 11: compile-time error - (C.static_field)++; // //# 12: compile-time error - ++(C.static_field); // //# 13: compile-time error + (C.static_field) = 0; // /// 11: compile-time error + (C.static_field)++; // /// 12: compile-time error + ++(C.static_field); // /// 13: compile-time error tl_static_var = [1, 2, 3]; tl_static_var[0] = 0; (tl_static_var)[0] = 0; - (tl_static_var[0]) = 0; // //# 21: compile-time error - (tl_static_var[0])++; // //# 22: compile-time error - ++(tl_static_var[0]); // //# 23: compile-time error + (tl_static_var[0]) = 0; // /// 21: compile-time error + (tl_static_var[0])++; // /// 22: compile-time error + ++(tl_static_var[0]); // /// 23: compile-time error C.static_field = [1, 2, 3]; - (C.static_field[0]) = 0; // //# 31: compile-time error - (C.static_field[0])++; // //# 32: compile-time error - ++(C.static_field[0]); // //# 33: compile-time error + (C.static_field[0]) = 0; // /// 31: compile-time error + (C.static_field[0])++; // /// 32: compile-time error + ++(C.static_field[0]); // /// 33: compile-time error var a = 0; - (a) = 0; // //# 41: compile-time error - (a)++; // //# 42: compile-time error - ++(a); // //# 43: compile-time error + (a) = 0; // /// 41: compile-time error + (a)++; // /// 42: compile-time error + ++(a); // /// 43: compile-time error // Neat palindrome expression. x is assignable, ((x)) is not. - var funcnuf = (x) => ((x))=((x)) <= (x); // //# 50: compile-time error + var funcnuf = (x) => ((x))=((x)) <= (x); // /// 50: compile-time error } diff --git a/tests/language_strong/async_await_syntax_test.dart b/tests/language_strong/async_await_syntax_test.dart index fc3bb857f7a..bc3531a1249 100644 --- a/tests/language_strong/async_await_syntax_test.dart +++ b/tests/language_strong/async_await_syntax_test.dart @@ -10,292 +10,292 @@ var yield = 0; var await = 0; get st => new Stream.fromIterable([]); -a01a() async => null; // //# a01a: ok -a01b() async* => null; // //# a01b: compile-time error -a01c() sync* => null; // //# a01c: compile-time error -a01d() async => yield 5; // //# a01d: compile-time error -a02a() async {} // //# a02a: ok -a03a() async* {} // //# a03a: ok -a03b() async * {} // //# a03b: ok -a04a() sync* {} // //# a04a: ok -a04b() sync {} // //# a04b: compile-time error -a04c() sync * {} // //# a04c: ok -a05a() async { await 0; } // //# a05a: ok -a05b() async { // //# a05b: ok - await(a) {}; // //# a05b: continued - await(0); // //# a05b: continued -} // //# a05b: continued -a05c() { // //# a05c: ok - await(a) {}; // //# a05c: continued - await(0); // //# a05c: continued -} // //# a05c: continued -a05d() async { // //# a05d: compile-time error - await(a) {} // //# a05d: continued - await(0); // //# a05d: continued -} // //# a05d: continued -a05e() { // //# a05e: ok - await(a) {} // //# a05e: continued - await(0); // //# a05e: continued -} // //# a05e: continued -a05f() async { // //# a05f: compile-time error - var await = (a) {}; // //# a05f: continued - await(0); // //# a05f: continued -} // //# a05f: continued -a05g() async { // //# a05g: continued - yield 5; // //# a05g: compile-time error -} // //# a05g: continued -a05h() async { // //# a05h: continued - yield* st; // //# a05h: compile-time error -} // //# a05h: continued -a06a() async { await for (var o in st) {} } // //# a06a: ok -a06b() sync* { await for (var o in st) {} } // //# a06b: compile-time error -a07a() sync* { yield 0; } // //# a07a: ok -a07b() sync { yield 0; } // //# a07b: compile-time error -a08a() sync* { yield* []; } // //# a08a: ok -a08b() sync { yield 0; } // //# a08b: compile-time error -a09a() async* { yield 0; } // //# a09a: ok -a10a() async* { yield* []; } // //# a10a: static type warning +a01a() async => null; // /// a01a: ok +a01b() async* => null; // /// a01b: compile-time error +a01c() sync* => null; // /// a01c: compile-time error +a01d() async => yield 5; // /// a01d: compile-time error +a02a() async {} // /// a02a: ok +a03a() async* {} // /// a03a: ok +a03b() async * {} // /// a03b: ok +a04a() sync* {} // /// a04a: ok +a04b() sync {} // /// a04b: compile-time error +a04c() sync * {} // /// a04c: ok +a05a() async { await 0; } // /// a05a: ok +a05b() async { // /// a05b: ok + await(a) {}; // /// a05b: continued + await(0); // /// a05b: continued +} // /// a05b: continued +a05c() { // /// a05c: ok + await(a) {}; // /// a05c: continued + await(0); // /// a05c: continued +} // /// a05c: continued +a05d() async { // /// a05d: compile-time error + await(a) {} // /// a05d: continued + await(0); // /// a05d: continued +} // /// a05d: continued +a05e() { // /// a05e: ok + await(a) {} // /// a05e: continued + await(0); // /// a05e: continued +} // /// a05e: continued +a05f() async { // /// a05f: compile-time error + var await = (a) {}; // /// a05f: continued + await(0); // /// a05f: continued +} // /// a05f: continued +a05g() async { // /// a05g: continued + yield 5; // /// a05g: compile-time error +} // /// a05g: continued +a05h() async { // /// a05h: continued + yield* st; // /// a05h: compile-time error +} // /// a05h: continued +a06a() async { await for (var o in st) {} } // /// a06a: ok +a06b() sync* { await for (var o in st) {} } // /// a06b: compile-time error +a07a() sync* { yield 0; } // /// a07a: ok +a07b() sync { yield 0; } // /// a07b: compile-time error +a08a() sync* { yield* []; } // /// a08a: ok +a08b() sync { yield 0; } // /// a08b: compile-time error +a09a() async* { yield 0; } // /// a09a: ok +a10a() async* { yield* []; } // /// a10a: static type warning -get sync sync {} // //# a11a: compile-time error -get sync sync* {} // //# a11b: ok -get async async {} // //# a11c: ok -get async async* {} // //# a11d: ok +get sync sync {} // /// a11a: compile-time error +get sync sync* {} // /// a11b: ok +get async async {} // /// a11c: ok +get async async* {} // /// a11d: ok -get sync {} // //# a12a: ok -get sync* {} // //# a12b: compile-time error -get async {} // //# a12c: ok -get async* {} // //# a12d: compile-time error -get a12e sync* => null; // //# a12e: compile-time error -get a12f async* => null; // //# a12f: compile-time error -get a12g async => null; // //# a12g: ok +get sync {} // /// a12a: ok +get sync* {} // /// a12b: compile-time error +get async {} // /// a12c: ok +get async* {} // /// a12d: compile-time error +get a12e sync* => null; // /// a12e: compile-time error +get a12f async* => null; // /// a12f: compile-time error +get a12g async => null; // /// a12g: ok -int sync; // //# a13a: ok -int sync*; // //# a13b: compile-time error -int async; // //# a13c: ok -int async*; // //# a13d: compile-time error +int sync; // /// a13a: ok +int sync*; // /// a13b: compile-time error +int async; // /// a13c: ok +int async*; // /// a13d: compile-time error -var sync; // //# a14a: ok -var sync*; // //# a14b: compile-time error -var async; // //# a14c: ok -var async*; // //# a14d: compile-time error +var sync; // /// a14a: ok +var sync*; // /// a14b: compile-time error +var async; // /// a14c: ok +var async*; // /// a14d: compile-time error -sync() {} // //# a15a: ok -sync*() {} // //# a15b: compile-time error -async() {} // //# a15c: ok -async*() {} // //# a15d: compile-time error +sync() {} // /// a15a: ok +sync*() {} // /// a15b: compile-time error +async() {} // /// a15c: ok +async*() {} // /// a15d: compile-time error abstract class B { - b00a() async; // //# b00a: compile-time error - b00b() async*; // //# b00b: compile-time error - b00c() sync*; // //# b00c: compile-time error - b00d() sync; // //# b00d: compile-time error + b00a() async; // /// b00a: compile-time error + b00b() async*; // /// b00b: compile-time error + b00c() sync*; // /// b00c: compile-time error + b00d() sync; // /// b00d: compile-time error } class C extends B { C(); - factory C.e1() async { return null; } // //# e1: compile-time error - factory C.e2() async* { return null; } // //# e2: compile-time error - factory C.e3() sync* { return null; } // //# e3: compile-time error - factory C.e4() async = C; // //# e4: compile-time error - factory C.e5() async* = C; // //# e5: compile-time error - factory C.e6() sync* = C; // //# e6: compile-time error - C.e7() async {} // //# e7: compile-time error - C.e8() async* {} // //# e8: compile-time error - C.e9() sync* {} // //# e9: compile-time error + factory C.e1() async { return null; } // /// e1: compile-time error + factory C.e2() async* { return null; } // /// e2: compile-time error + factory C.e3() sync* { return null; } // /// e3: compile-time error + factory C.e4() async = C; // /// e4: compile-time error + factory C.e5() async* = C; // /// e5: compile-time error + factory C.e6() sync* = C; // /// e6: compile-time error + C.e7() async {} // /// e7: compile-time error + C.e8() async* {} // /// e8: compile-time error + C.e9() sync* {} // /// e9: compile-time error - b00a() {} // //# b00a: continued - b00b() {} // //# b00b: continued - b00c() {} // //# b00c: continued - b00d() {} // //# b00d: continued + b00a() {} // /// b00a: continued + b00b() {} // /// b00b: continued + b00c() {} // /// b00c: continued + b00d() {} // /// b00d: continued - b01a() async => null; // //# b01a: ok - b01b() async* => null; // //# b01b: compile-time error - b01c() sync* => null; // //# b01c: compile-time error - b02a() async {} // //# b02a: ok - b03a() async* {} // //# b03a: ok - b04a() sync* {} // //# b04a: ok - b04b() sync {} // //# b04b: compile-time error - b05a() async { await 0; } // //# b05a: ok - b06a() async { await for (var o in st) {} } // //# b06a: ok - b06b() async { await for ( ; ; ) {} } // //# b06b: compile-time error - b07a() sync* { yield 0; } // //# b07a: ok - b08a() sync* { yield* []; } // //# b08a: ok - b09a() async* { yield 0; } // //# b09a: ok - b10a() async* { yield* []; } // //# b10a: static type warning - b10b() async { yield 0; } // //# b10b: compile-time error + b01a() async => null; // /// b01a: ok + b01b() async* => null; // /// b01b: compile-time error + b01c() sync* => null; // /// b01c: compile-time error + b02a() async {} // /// b02a: ok + b03a() async* {} // /// b03a: ok + b04a() sync* {} // /// b04a: ok + b04b() sync {} // /// b04b: compile-time error + b05a() async { await 0; } // /// b05a: ok + b06a() async { await for (var o in st) {} } // /// b06a: ok + b06b() async { await for ( ; ; ) {} } // /// b06b: compile-time error + b07a() sync* { yield 0; } // /// b07a: ok + b08a() sync* { yield* []; } // /// b08a: ok + b09a() async* { yield 0; } // /// b09a: ok + b10a() async* { yield* []; } // /// b10a: static type warning + b10b() async { yield 0; } // /// b10b: compile-time error - get sync sync {} // //# b11a: compile-time error - get sync sync* {} // //# b11b: ok - get async async {} // //# b11c: ok - get async async* {} // //# b11d: ok + get sync sync {} // /// b11a: compile-time error + get sync sync* {} // /// b11b: ok + get async async {} // /// b11c: ok + get async async* {} // /// b11d: ok - get sync {} // //# b12a: ok - get sync* {} // //# b12b: compile-time error - get async {} // //# b12c: ok - get async* {} // //# b12d: compile-time error - get b12e sync* => null; // //# b12e: compile-time error - get b12f async* => null; // //# b12f: compile-time error - get b12g async => null; // //# b12g: ok + get sync {} // /// b12a: ok + get sync* {} // /// b12b: compile-time error + get async {} // /// b12c: ok + get async* {} // /// b12d: compile-time error + get b12e sync* => null; // /// b12e: compile-time error + get b12f async* => null; // /// b12f: compile-time error + get b12g async => null; // /// b12g: ok - int sync; // //# b13a: ok - int sync*; // //# b13b: compile-time error - int async; // //# b13c: ok - int async*; // //# b13d: compile-time error + int sync; // /// b13a: ok + int sync*; // /// b13b: compile-time error + int async; // /// b13c: ok + int async*; // /// b13d: compile-time error - var sync; // //# b14a: ok - var sync*; // //# b14b: compile-time error - var async; // //# b14c: ok - var async*; // //# b14d: compile-time error + var sync; // /// b14a: ok + var sync*; // /// b14b: compile-time error + var async; // /// b14c: ok + var async*; // /// b14d: compile-time error - sync() {} // //# b15a: ok - sync*() {} // //# b15b: compile-time error - async() {} // //# b15c: ok - async*() {} // //# b15d: compile-time error + sync() {} // /// b15a: ok + sync*() {} // /// b15b: compile-time error + async() {} // /// b15c: ok + async*() {} // /// b15d: compile-time error } method1() { - c01a() async => null; c01a(); // //# c01a: ok - c01b() async* => null; c01b(); // //# c01b: compile-time error - c01c() sync* => null; c01c(); // //# c01c: compile-time error - c02a() async {} c02a(); // //# c02a: ok - c03a() async* {} c03a(); // //# c03a: ok - c04a() sync* {} c04a(); // //# c04a: ok - c04b() sync {} c04b(); // //# c04b: compile-time error - c05a() async { await 0; } c05a(); // //# c05a: ok - c06a() async { await for (var o in st) {} } c06a(); // //# c06a: ok - c07a() sync* { yield 0; } c07a(); // //# c07a: ok - c08a() sync* { yield* []; } c08a(); // //# c08a: ok - c09a() async* { yield 0; } c09a(); // //# c09a: ok - c10a() async* { yield* []; } c10a(); // //# c10a: static type warning - c11a() async { yield -5; } c11a(); // //# c11a: compile-time error - c11b() async { yield* st; } c11b(); // //# c11b: compile-time error + c01a() async => null; c01a(); // /// c01a: ok + c01b() async* => null; c01b(); // /// c01b: compile-time error + c01c() sync* => null; c01c(); // /// c01c: compile-time error + c02a() async {} c02a(); // /// c02a: ok + c03a() async* {} c03a(); // /// c03a: ok + c04a() sync* {} c04a(); // /// c04a: ok + c04b() sync {} c04b(); // /// c04b: compile-time error + c05a() async { await 0; } c05a(); // /// c05a: ok + c06a() async { await for (var o in st) {} } c06a(); // /// c06a: ok + c07a() sync* { yield 0; } c07a(); // /// c07a: ok + c08a() sync* { yield* []; } c08a(); // /// c08a: ok + c09a() async* { yield 0; } c09a(); // /// c09a: ok + c10a() async* { yield* []; } c10a(); // /// c10a: static type warning + c11a() async { yield -5; } c11a(); // /// c11a: compile-time error + c11b() async { yield* st; } c11b(); // /// c11b: compile-time error } method2() { - var d01a = () async => null; d01a(); // //# d01a: ok - var d01b = () async* => null; d01b(); // //# d01b: compile-time error - var d01c = () sync* => null; d01c(); // //# d01c: compile-time error - var d02a = () async {}; d02a(); // //# d02a: ok - var d03a = () async* {}; d03a(); // //# d03a: ok - var d04a = () sync* {}; d04a(); // //# d04a: ok - var d04b = () sync {}; d04b(); // //# d04b: compile-time error - var d05a = () async { await 0; }; d05a(); // //# d05a: ok - var d06a = () async { await for (var o in st) {} }; d06a(); // //# d06a: ok - var d07a = () sync* { yield 0; }; d07a(); // //# d07a: ok - var d08a = () sync* { yield* []; }; d08a(); // //# d08a: ok - var d08b = () sync* { yield*0+1; }; d08b(); // //# d08b: static type warning - var d08c = () { yield*0+1; }; d08c(); // //# d08c: ok - var d09a = () async* { yield 0; }; d09a(); // //# d09a: ok - var d10a = () async* { yield* []; }; d10a(); // //# d10a: static type warning + var d01a = () async => null; d01a(); // /// d01a: ok + var d01b = () async* => null; d01b(); // /// d01b: compile-time error + var d01c = () sync* => null; d01c(); // /// d01c: compile-time error + var d02a = () async {}; d02a(); // /// d02a: ok + var d03a = () async* {}; d03a(); // /// d03a: ok + var d04a = () sync* {}; d04a(); // /// d04a: ok + var d04b = () sync {}; d04b(); // /// d04b: compile-time error + var d05a = () async { await 0; }; d05a(); // /// d05a: ok + var d06a = () async { await for (var o in st) {} }; d06a(); // /// d06a: ok + var d07a = () sync* { yield 0; }; d07a(); // /// d07a: ok + var d08a = () sync* { yield* []; }; d08a(); // /// d08a: ok + var d08b = () sync* { yield*0+1; }; d08b(); // /// d08b: static type warning + var d08c = () { yield*0+1; }; d08c(); // /// d08c: ok + var d09a = () async* { yield 0; }; d09a(); // /// d09a: ok + var d10a = () async* { yield* []; }; d10a(); // /// d10a: static type warning } void main() { var a; var c = new C(); - c = new C.e1(); //# e1: continued - c = new C.e2(); //# e2: continued - c = new C.e3(); //# e3: continued - c = new C.e4(); //# e4: continued - c = new C.e5(); //# e5: continued - c = new C.e6(); //# e6: continued - c = new C.e7(); //# e7: continued - c = new C.e8(); //# e8: continued - c = new C.e9(); //# e9: continued + c = new C.e1(); /// e1: continued + c = new C.e2(); /// e2: continued + c = new C.e3(); /// e3: continued + c = new C.e4(); /// e4: continued + c = new C.e5(); /// e5: continued + c = new C.e6(); /// e6: continued + c = new C.e7(); /// e7: continued + c = new C.e8(); /// e8: continued + c = new C.e9(); /// e9: continued - a01a(); // //# a01a: continued - a01b(); // //# a01b: continued - a01c(); // //# a01c: continued - a01d(); // //# a01d: continued - a02a(); // //# a02a: continued - a03a(); // //# a03a: continued - a03b(); // //# a03b: continued - a04a(); // //# a04a: continued - a04b(); // //# a04b: continued - a04c(); // //# a04c: continued - a05a(); // //# a05a: continued - a05b(); // //# a05b: continued - a05c(); // //# a05c: continued - a05d(); // //# a05d: continued - a05e(); // //# a05e: continued - a05f(); // //# a05f: continued - a05g(); // //# a05g: continued - a05h(); // //# a05h: continued - a06a(); // //# a06a: continued - a06b(); // //# a06b: continued - a07a(); // //# a07a: continued - a07b(); // //# a07b: continued - a08a(); // //# a08a: continued - a08b(); // //# a08b: continued - a09a(); // //# a09a: continued - a10a(); // //# a10a: continued - a = sync; // //# a11a: continued - a = sync; // //# a11b: continued - a = async; // //# a11c: continued - a = async; // //# a11d: continued - a = sync; // //# a12a: continued - a = sync; // //# a12b: continued - a = async; // //# a12c: continued - a = async; // //# a12d: continued - a = a12e; // //# a12e: continued - a = a12f; // //# a12f: continued - a = a12g; // //# a12g: continued - a = sync; // //# a13a: continued - a = sync; // //# a13b: continued - a = async; // //# a13c: continued - a = async; // //# a13d: continued - a = sync; // //# a14a: continued - a = sync; // //# a14b: continued - a = async; // //# a14c: continued - a = async; // //# a14d: continued - sync(); // //# a15a: continued - sync(); // //# a15b: continued - async(); // //# a15c: continued - async(); // //# a15d: continued + a01a(); // /// a01a: continued + a01b(); // /// a01b: continued + a01c(); // /// a01c: continued + a01d(); // /// a01d: continued + a02a(); // /// a02a: continued + a03a(); // /// a03a: continued + a03b(); // /// a03b: continued + a04a(); // /// a04a: continued + a04b(); // /// a04b: continued + a04c(); // /// a04c: continued + a05a(); // /// a05a: continued + a05b(); // /// a05b: continued + a05c(); // /// a05c: continued + a05d(); // /// a05d: continued + a05e(); // /// a05e: continued + a05f(); // /// a05f: continued + a05g(); // /// a05g: continued + a05h(); // /// a05h: continued + a06a(); // /// a06a: continued + a06b(); // /// a06b: continued + a07a(); // /// a07a: continued + a07b(); // /// a07b: continued + a08a(); // /// a08a: continued + a08b(); // /// a08b: continued + a09a(); // /// a09a: continued + a10a(); // /// a10a: continued + a = sync; // /// a11a: continued + a = sync; // /// a11b: continued + a = async; // /// a11c: continued + a = async; // /// a11d: continued + a = sync; // /// a12a: continued + a = sync; // /// a12b: continued + a = async; // /// a12c: continued + a = async; // /// a12d: continued + a = a12e; // /// a12e: continued + a = a12f; // /// a12f: continued + a = a12g; // /// a12g: continued + a = sync; // /// a13a: continued + a = sync; // /// a13b: continued + a = async; // /// a13c: continued + a = async; // /// a13d: continued + a = sync; // /// a14a: continued + a = sync; // /// a14b: continued + a = async; // /// a14c: continued + a = async; // /// a14d: continued + sync(); // /// a15a: continued + sync(); // /// a15b: continued + async(); // /// a15c: continued + async(); // /// a15d: continued - c.b00a(); // //# b00a: continued - c.b00b(); // //# b00b: continued - c.b00c(); // //# b00c: continued - c.b00d(); // //# b00d: continued - c.b01a(); // //# b01a: continued - c.b01b(); // //# b01b: continued - c.b01c(); // //# b01c: continued - c.b02a(); // //# b02a: continued - c.b03a(); // //# b03a: continued - c.b04a(); // //# b04a: continued - c.b04b(); // //# b04b: continued - c.b05a(); // //# b05a: continued - c.b06a(); // //# b06a: continued - c.b06b(); // //# b06b: continued - c.b07a(); // //# b07a: continued - c.b08a(); // //# b08a: continued - c.b09a(); // //# b09a: continued - c.b10a(); // //# b10a: continued - c.b10b(); // //# b10b: continued - a = c.sync; // //# b11a: continued - a = c.sync; // //# b11b: continued - a = c.async; // //# b11c: continued - a = c.async; // //# b11d: continued - a = c.sync; // //# b12a: continued - a = c.sync; // //# b12b: continued - a = c.async; // //# b12c: continued - a = c.async; // //# b12d: continued - a = c.b12e; // //# b12e: continued - a = c.b12f; // //# b12f: continued - a = c.b12g; // //# b12g: continued - a = c.sync; // //# b13a: continued - a = c.sync; // //# b13b: continued - a = c.async; // //# b13c: continued - a = c.async; // //# b13d: continued - a = c.sync; // //# b14a: continued - a = c.sync; // //# b14b: continued - a = c.async; // //# b14c: continued - a = c.async; // //# b14d: continued - c.sync(); // //# b15a: continued - c.sync(); // //# b15b: continued - c.async(); // //# b15c: continued - c.async(); // //# b15d: continued + c.b00a(); // /// b00a: continued + c.b00b(); // /// b00b: continued + c.b00c(); // /// b00c: continued + c.b00d(); // /// b00d: continued + c.b01a(); // /// b01a: continued + c.b01b(); // /// b01b: continued + c.b01c(); // /// b01c: continued + c.b02a(); // /// b02a: continued + c.b03a(); // /// b03a: continued + c.b04a(); // /// b04a: continued + c.b04b(); // /// b04b: continued + c.b05a(); // /// b05a: continued + c.b06a(); // /// b06a: continued + c.b06b(); // /// b06b: continued + c.b07a(); // /// b07a: continued + c.b08a(); // /// b08a: continued + c.b09a(); // /// b09a: continued + c.b10a(); // /// b10a: continued + c.b10b(); // /// b10b: continued + a = c.sync; // /// b11a: continued + a = c.sync; // /// b11b: continued + a = c.async; // /// b11c: continued + a = c.async; // /// b11d: continued + a = c.sync; // /// b12a: continued + a = c.sync; // /// b12b: continued + a = c.async; // /// b12c: continued + a = c.async; // /// b12d: continued + a = c.b12e; // /// b12e: continued + a = c.b12f; // /// b12f: continued + a = c.b12g; // /// b12g: continued + a = c.sync; // /// b13a: continued + a = c.sync; // /// b13b: continued + a = c.async; // /// b13c: continued + a = c.async; // /// b13d: continued + a = c.sync; // /// b14a: continued + a = c.sync; // /// b14b: continued + a = c.async; // /// b14c: continued + a = c.async; // /// b14d: continued + c.sync(); // /// b15a: continued + c.sync(); // /// b15b: continued + c.async(); // /// b15c: continued + c.async(); // /// b15d: continued method1(); method2(); diff --git a/tests/language_strong/async_await_test.dart b/tests/language_strong/async_await_test.dart index e8884b37112..fe199cec623 100644 --- a/tests/language_strong/async_await_test.dart +++ b/tests/language_strong/async_await_test.dart @@ -1731,37 +1731,37 @@ main() { if (!checkedMode) return; - test("inside assert, true", () { // //# 03: ok - f() async { // //# 03: continued - assert(await new Future.microtask(() => true)); // //# 03: continued - return 42; // //# 03: continued - } // //# 03: continued - return expect42(f()); // //# 03: continued - }); // //# 03: continued + test("inside assert, true", () { // /// 03: ok + f() async { // /// 03: continued + assert(await new Future.microtask(() => true)); // /// 03: continued + return 42; // /// 03: continued + } // /// 03: continued + return expect42(f()); // /// 03: continued + }); // /// 03: continued - test("inside assert, false", () { // //# 03: continued - f() async { // //# 03: continued - assert(await new Future.microtask(() => false)); // //# 03: continued - return 42; // //# 03: continued - } // //# 03: continued - return f().then((_) { // //# 03: continued - fail("assert didn't throw"); // //# 03: continued - }, onError: (e, s) { // //# 03: continued - expect(e is AssertionError, isTrue); // //# 03: continued - }); // //# 03: continued - }); // //# 03: continued + test("inside assert, false", () { // /// 03: continued + f() async { // /// 03: continued + assert(await new Future.microtask(() => false)); // /// 03: continued + return 42; // /// 03: continued + } // /// 03: continued + return f().then((_) { // /// 03: continued + fail("assert didn't throw"); // /// 03: continued + }, onError: (e, s) { // /// 03: continued + expect(e is AssertionError, isTrue); // /// 03: continued + }); // /// 03: continued + }); // /// 03: continued - test("inside assert, function -> false", () { // //# 03: continued - f() async { // //# 03: continued - assert(await new Future.microtask(() => false)); // //# 03: continued - return 42; // //# 03: continued - } // //# 03: continued - return f().then((_) { // //# 03: continued - fail("assert didn't throw"); // //# 03: continued - }, onError: (e, s) { // //# 03: continued - expect(e is AssertionError, isTrue); // //# 03: continued - }); // //# 03: continued - }); // //# 03: continued + test("inside assert, function -> false", () { // /// 03: continued + f() async { // /// 03: continued + assert(await new Future.microtask(() => false)); // /// 03: continued + return 42; // /// 03: continued + } // /// 03: continued + return f().then((_) { // /// 03: continued + fail("assert didn't throw"); // /// 03: continued + }, onError: (e, s) { // /// 03: continued + expect(e is AssertionError, isTrue); // /// 03: continued + }); // /// 03: continued + }); // /// 03: continued }); @@ -1772,11 +1772,11 @@ main() { expect(async, equals(42)); }); - test("await as variable", () { // //# 02: ok - // Valid identifiers outside of async function. // //# 02: continued - var await = 42; // //# 02: continued - expect(await, equals(42)); // //# 02: continued - }); // //# 02: continued + test("await as variable", () { // /// 02: ok + // Valid identifiers outside of async function. // /// 02: continued + var await = 42; // /// 02: continued + expect(await, equals(42)); // /// 02: continued + }); // /// 02: continued test("yield as variable", () { // Valid identifiers outside of async function. diff --git a/tests/language_strong/async_continue_label_test.dart b/tests/language_strong/async_continue_label_test.dart index 3ace73af4da..d2d7cc85e90 100644 --- a/tests/language_strong/async_continue_label_test.dart +++ b/tests/language_strong/async_continue_label_test.dart @@ -10,14 +10,14 @@ test1() async { var r = 0; label: for(var i = 1, j = - await //# await_in_init: ok + await /// await_in_init: ok 10; i < 10 && j > - await //# await_in_condition: ok + await /// await_in_condition: ok -5; j--, i += - await //# await_in_update: ok + await /// await_in_update: ok 1) { if (i < - await //# await_in_body: ok + await /// await_in_body: ok 5 || j < -5) { continue label; } @@ -31,14 +31,14 @@ test2() async { var r = 0; label: for(var i = - await //# await_in_init: ok + await /// await_in_init: ok 0; i < - await //# await_in_condition: ok + await /// await_in_condition: ok 10; i += - await //# await_in_update: ok + await /// await_in_update: ok 1) { if (i < - await //# await_in_body: ok + await /// await_in_body: ok 5) { continue label; } @@ -52,14 +52,14 @@ test3() async { var r = 0, i, j; label: for(i = - await //# await_in_init: ok + await /// await_in_init: ok 0; i < - await //# await_in_condition: ok + await /// await_in_condition: ok 10; i += - await //# await_in_update: ok + await /// await_in_update: ok 1) { if (i < - await //# await_in_body: ok + await /// await_in_body: ok 5) { continue label; } @@ -73,14 +73,14 @@ test4() async { var r = 0; label: for(var i = - await //# await_in_init: ok + await /// await_in_init: ok 0; i < - await //# await_in_condition: ok + await /// await_in_condition: ok 10; i+= - await //# await_in_update: ok + await /// await_in_update: ok 1) { if (i < - await //# await_in_body: ok + await /// await_in_body: ok 5) { for (int i = 0; i < 10; i++) { continue label; diff --git a/tests/language_strong/async_or_generator_return_type_stacktrace_test.dart b/tests/language_strong/async_or_generator_return_type_stacktrace_test.dart index 9326d89e2b3..8f8dc4b34d2 100644 --- a/tests/language_strong/async_or_generator_return_type_stacktrace_test.dart +++ b/tests/language_strong/async_or_generator_return_type_stacktrace_test.dart @@ -4,13 +4,13 @@ import "package:expect/expect.dart"; -void badReturnTypeAsync() async {} // //# 01: static type warning -void badReturnTypeAsyncStar() async* {} // //# 02: static type warning -void badReturnTypeSyncStar() sync* {} // //# 03: static type warning +void badReturnTypeAsync() async {} // /// 01: static type warning +void badReturnTypeAsyncStar() async* {} // /// 02: static type warning +void badReturnTypeSyncStar() sync* {} // /// 03: static type warning main() { try { - badReturnTypeAsync(); // //# 01: continued + badReturnTypeAsync(); // /// 01: continued } catch(e, st) { Expect.isTrue(e is TypeError, "wrong exception type"); Expect.isTrue(st.toString().contains("badReturnTypeAsync"), @@ -18,7 +18,7 @@ main() { } try { - badReturnTypeAsyncStar(); // //# 02: continued + badReturnTypeAsyncStar(); // /// 02: continued } catch(e, st) { Expect.isTrue(e is TypeError, "wrong exception type"); Expect.isTrue(st.toString().contains("badReturnTypeAsyncStar"), @@ -26,7 +26,7 @@ main() { } try { - badReturnTypeSyncStar(); // //# 03: continued + badReturnTypeSyncStar(); // /// 03: continued } catch(e, st) { Expect.isTrue(e is TypeError, "wrong exception type"); Expect.isTrue(st.toString().contains("badReturnTypeSyncStar"), diff --git a/tests/language_strong/async_return_types_test.dart b/tests/language_strong/async_return_types_test.dart index 103a9f2fb1f..83eb9a8d992 100644 --- a/tests/language_strong/async_return_types_test.dart +++ b/tests/language_strong/async_return_types_test.dart @@ -14,18 +14,18 @@ Future foo2() async { return 3; } -Future //# wrongTypeParameter: static type warning +Future /// wrongTypeParameter: static type warning foo3() async { return "String"; } // Future is treated like Future -Future //# tooManyTypeParameters: static type warning +Future /// tooManyTypeParameters: static type warning foo4() async { return "String"; } -int //# wrongReturnType: static type warning, dynamic type error +int /// wrongReturnType: static type warning, dynamic type error foo5() async { return 3; } @@ -35,7 +35,7 @@ Future foo6() async { return new Future.value(3); } -Future> //# nestedFuture: static type warning +Future> /// nestedFuture: static type warning foo7() async { return new Future.value(3); } diff --git a/tests/language_strong/async_star_test.dart b/tests/language_strong/async_star_test.dart index ce0528dbb46..96a5120db91 100644 --- a/tests/language_strong/async_star_test.dart +++ b/tests/language_strong/async_star_test.dart @@ -148,12 +148,12 @@ main() { }); // VM issue 2238 - test("labeled 2", () { // //# 01: ok - f() async* { // //# 01: continued - label1: label2: yield 0; // //# 01: continued - } // //# 01: continued - return expectList(f(), [0]); // //# 01: continued - }); // //# 01: continued + test("labeled 2", () { // /// 01: ok + f() async* { // /// 01: continued + label1: label2: yield 0; // /// 01: continued + } // /// 01: continued + return expectList(f(), [0]); // /// 01: continued + }); // /// 01: continued test("for-loop", () { f() async* { @@ -710,35 +710,35 @@ main() { }); }); - test("canceling while paused at yield", () { // //# 02: ok - var list = []; // //# 02: continued - var sync = new Sync(); // //# 02: continued - f() async* { // //# 02: continued - list.add("*1"); // //# 02: continued - yield 1; // //# 02: continued - await sync.wait(); // //# 02: continued - sync.release(); // //# 02: continued - list.add("*2"); // //# 02: continued - yield 2; // //# 02: continued - list.add("*3"); // //# 02: continued - }; // //# 02: continued - var stream = f(); // //# 02: continued + test("canceling while paused at yield", () { // /// 02: ok + var list = []; // /// 02: continued + var sync = new Sync(); // /// 02: continued + f() async* { // /// 02: continued + list.add("*1"); // /// 02: continued + yield 1; // /// 02: continued + await sync.wait(); // /// 02: continued + sync.release(); // /// 02: continued + list.add("*2"); // /// 02: continued + yield 2; // /// 02: continued + list.add("*3"); // /// 02: continued + }; // /// 02: continued + var stream = f(); // /// 02: continued // TODO(jmesserly): added workaround for: // https://github.com/dart-lang/dev_compiler/issues/269 - var sub = stream.listen((x) => list.add(x)); // //# 02: continued - return sync.wait().whenComplete(() { // //# 02: continued - expect(list, equals(["*1", 1])); // //# 02: continued - sub.pause(); // //# 02: continued - return sync.wait(); // //# 02: continued - }).whenComplete(() { // //# 02: continued - expect(list, equals(["*1", 1, "*2"])); // //# 02: continued - sub.cancel(); // //# 02: continued - return new Future.delayed(MS * 200, () { // //# 02: continued - // Should not have yielded 2 or added *3 while paused. // //# 02: continued - expect(list, equals(["*1", 1, "*2"])); // //# 02: continued - }); // //# 02: continued - }); // //# 02: continued - }); // //# 02: continued + var sub = stream.listen((x) => list.add(x)); // /// 02: continued + return sync.wait().whenComplete(() { // /// 02: continued + expect(list, equals(["*1", 1])); // /// 02: continued + sub.pause(); // /// 02: continued + return sync.wait(); // /// 02: continued + }).whenComplete(() { // /// 02: continued + expect(list, equals(["*1", 1, "*2"])); // /// 02: continued + sub.cancel(); // /// 02: continued + return new Future.delayed(MS * 200, () { // /// 02: continued + // Should not have yielded 2 or added *3 while paused. // /// 02: continued + expect(list, equals(["*1", 1, "*2"])); // /// 02: continued + }); // /// 02: continued + }); // /// 02: continued + }); // /// 02: continued }); group("await for", () { @@ -768,16 +768,16 @@ main() { }); }); - test("simple stream - take", () { // //# 03: ok - f(s) async { // //# 03: continued - var r = 0; // //# 03: continued - await for(var v in s.take(5)) r += v; // //# 03: continued - return r; // //# 03: continued - } // //# 03: continued - return f(mkStream(10)).then((v) { // //# 03: continued - expect(v, equals(10)); // //# 03: continued - }); // //# 03: continued - }); // //# 03: continued + test("simple stream - take", () { // /// 03: ok + f(s) async { // /// 03: continued + var r = 0; // /// 03: continued + await for(var v in s.take(5)) r += v; // /// 03: continued + return r; // /// 03: continued + } // /// 03: continued + return f(mkStream(10)).then((v) { // /// 03: continued + expect(v, equals(10)); // /// 03: continued + }); // /// 03: continued + }); // /// 03: continued test("simple stream reyield", () { f(s) async* { @@ -795,13 +795,13 @@ main() { return expectList(f(mkStream(5)), [0, 1, 3, 6, 10]); }); - test("simple stream - take, reyield", () { // //# 04: ok - f(s) async* { // //# 04: continued - var r = 0; // //# 04: continued - await for(var v in s.take(5)) yield r += v; // //# 04: continued - } // //# 04: continued - return expectList(f(mkStream(10)), [0, 1, 3, 6, 10]); // //# 04: continued - }); // //# 04: continued + test("simple stream - take, reyield", () { // /// 04: ok + f(s) async* { // /// 04: continued + var r = 0; // /// 04: continued + await for(var v in s.take(5)) yield r += v; // /// 04: continued + } // /// 04: continued + return expectList(f(mkStream(10)), [0, 1, 3, 6, 10]); // /// 04: continued + }); // /// 04: continued test("nested", () { f() async { @@ -849,28 +849,28 @@ main() { }); }); - test("await pauses loop", () { // //# 05: ok - var sc; // //# 05: continued - var i = 0; // //# 05: continued - void send() { // //# 05: continued - if (i == 5) { // //# 05: continued - sc.close(); // //# 05: continued - } else { // //# 05: continued - sc.add(i++); // //# 05: continued - } // //# 05: continued - } // //# 05: continued - sc = new StreamController(onListen: send, onResume: send); // //# 05: continued - f(s) async { // //# 05: continued - var r = 0; // //# 05: continued - await for (var i in s) { // //# 05: continued - r += await new Future.delayed(MS * 10, () => i); // //# 05: continued - } // //# 05: continued - return r; // //# 05: continued - } // //# 05: continued - return f(sc.stream).then((v) { // //# 05: continued - expect(v, equals(10)); // //# 05: continued - }); // //# 05: continued - }); // //# 05: continued + test("await pauses loop", () { // /// 05: ok + var sc; // /// 05: continued + var i = 0; // /// 05: continued + void send() { // /// 05: continued + if (i == 5) { // /// 05: continued + sc.close(); // /// 05: continued + } else { // /// 05: continued + sc.add(i++); // /// 05: continued + } // /// 05: continued + } // /// 05: continued + sc = new StreamController(onListen: send, onResume: send); // /// 05: continued + f(s) async { // /// 05: continued + var r = 0; // /// 05: continued + await for (var i in s) { // /// 05: continued + r += await new Future.delayed(MS * 10, () => i); // /// 05: continued + } // /// 05: continued + return r; // /// 05: continued + } // /// 05: continued + return f(sc.stream).then((v) { // /// 05: continued + expect(v, equals(10)); // /// 05: continued + }); // /// 05: continued + }); // /// 05: continued }); } diff --git a/tests/language_strong/async_switch_test.dart b/tests/language_strong/async_switch_test.dart index 8fabeb68aea..1e373211172 100644 --- a/tests/language_strong/async_switch_test.dart +++ b/tests/language_strong/async_switch_test.dart @@ -16,7 +16,7 @@ foo1(a) async { case 2: k += a; return k+2; - default: k = 2; //# withDefault: ok + default: k = 2; /// withDefault: ok } return k; } @@ -31,7 +31,7 @@ foo2(a) async { case 2: k += await a; return k+2; - default: k = 2; //# withDefault: ok + default: k = 2; /// withDefault: ok } return k; } @@ -45,7 +45,7 @@ foo3(a) async { case 2: k += a; return k+2; - default: k = 2; //# withDefault: ok + default: k = 2; /// withDefault: ok } return k; } @@ -59,7 +59,7 @@ foo4(value) async { case 2: k += 2; return 2 + k; - default: k = 2; //# withDefault: ok + default: k = 2; /// withDefault: ok } return k; } @@ -69,20 +69,20 @@ futureOf(a) async => await a; test() async { Expect.equals(1, await foo1(1)); Expect.equals(4, await foo1(2)); - Expect.equals(2, await foo1(3)); //# withDefault: ok - Expect.equals(0, await foo1(3)); //# none: ok + Expect.equals(2, await foo1(3)); /// withDefault: ok + Expect.equals(0, await foo1(3)); /// none: ok Expect.equals(1, await foo2(futureOf(1))); Expect.equals(4, await foo2(futureOf(2))); - Expect.equals(2, await foo2(futureOf(3))); //# withDefault: ok - Expect.equals(0, await foo2(futureOf(3))); //# none: ok + Expect.equals(2, await foo2(futureOf(3))); /// withDefault: ok + Expect.equals(0, await foo2(futureOf(3))); /// none: ok Expect.equals(1, await foo3(1)); Expect.equals(4, await foo3(2)); - Expect.equals(2, await foo3(3)); //# withDefault: ok - Expect.equals(0, await foo3(3)); //# none: ok + Expect.equals(2, await foo3(3)); /// withDefault: ok + Expect.equals(0, await foo3(3)); /// none: ok Expect.equals(1, await foo4(futureOf(1))); Expect.equals(4, await foo4(futureOf(2))); - Expect.equals(2, await foo4(futureOf(3))); //# withDefault: ok - Expect.equals(0, await foo4(futureOf(3))); //# none: ok + Expect.equals(2, await foo4(futureOf(3))); /// withDefault: ok + Expect.equals(0, await foo4(futureOf(3))); /// none: ok } void main() { diff --git a/tests/language_strong/async_throw_in_catch_test.dart b/tests/language_strong/async_throw_in_catch_test.dart index 700621db749..05015a66874 100644 --- a/tests/language_strong/async_throw_in_catch_test.dart +++ b/tests/language_strong/async_throw_in_catch_test.dart @@ -32,7 +32,7 @@ foo1(Tracer tracer) async { tracer.trace("a"); // This await forces dart2js to rewrite the try into a state machine // instead of relying on the existing structure. - await new Future.value(3); //# forceAwait: ok + await new Future.value(3); /// forceAwait: ok tracer.trace("b"); throw "Error"; } catch (error) { @@ -49,7 +49,7 @@ foo1(Tracer tracer) async { foo2(Tracer tracer) async { try { tracer.trace("a"); - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("b"); throw "Error"; tracer.trace("c"); @@ -66,7 +66,7 @@ foo2(Tracer tracer) async { foo3(Tracer tracer) async { try { tracer.trace("a"); - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("b"); throw "Error"; tracer.trace("c"); @@ -83,7 +83,7 @@ foo3(Tracer tracer) async { foo4(Tracer tracer) async { try { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("a"); throw "Error"; } catch(error) { @@ -103,7 +103,7 @@ foo5(Tracer tracer) async { try { tracer.trace("a"); try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("b"); throw "Error"; } catch(error) { @@ -121,7 +121,7 @@ foo5(Tracer tracer) async { foo6(Tracer tracer) async { try { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("a"); throw "Error"; } catch(error) { @@ -142,7 +142,7 @@ foo6(Tracer tracer) async { foo7(Tracer tracer) async { try { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("a"); throw "Error"; } catch(error) { @@ -162,7 +162,7 @@ foo7(Tracer tracer) async { foo8(Tracer tracer) async { try { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("a"); throw "Error"; } catch(error) { @@ -183,7 +183,7 @@ foo9(Tracer tracer) async { try { while(true) { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("a"); throw "Error"; } catch(error) { @@ -213,7 +213,7 @@ foo10(Tracer tracer) async { } catch (error) { tracer.trace("b"); try { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued throw "Error2"; } catch(error) { tracer.trace("c"); @@ -246,7 +246,7 @@ foo11(Tracer tracer) async { tracer.trace("a"); if (firstTime) { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("b"); throw "Error"; } catch(error) { @@ -275,7 +275,7 @@ foo12(Tracer tracer) async { tracer.trace("a"); if (firstTime) { try { - await new Future.value(3); //# forceAwait: continued + await new Future.value(3); /// forceAwait: continued tracer.trace("b"); throw "Error"; } catch(error) { @@ -309,7 +309,7 @@ foo13(Tracer tracer) async { tracer.trace("c"); try { try { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued tracer.trace("d"); throw "Error"; } finally { @@ -333,7 +333,7 @@ foo14(Tracer tracer) async { } catch (error) { tracer.trace("b"); try { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued throw "Error2"; } catch(error) { tracer.trace("c"); @@ -359,7 +359,7 @@ foo15(Tracer tracer) async { } catch (error) { tracer.trace("b"); try { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued throw "Error2"; } catch(error) { tracer.trace("c"); @@ -386,7 +386,7 @@ foo16(Tracer tracer) async { } catch (error) { tracer.trace("b"); try { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued throw "Error2"; } catch(error) { tracer.trace("c"); @@ -413,7 +413,7 @@ foo17(Tracer tracer) async { tracer.trace("b"); throw "Error"; } catch (error) { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued Expect.equals("Error", error); tracer.trace("c"); } finally { @@ -431,7 +431,7 @@ foo18(Tracer tracer) async { try { tracer.trace("b"); } finally { - await new Future.value(3); // //# forceAwait: continued + await new Future.value(3); // /// forceAwait: continued tracer.trace("c"); } tracer.trace("d"); diff --git a/tests/language_strong/await_backwards_compatibility_test.dart b/tests/language_strong/await_backwards_compatibility_test.dart index f511a988884..c8e2d590c67 100644 --- a/tests/language_strong/await_backwards_compatibility_test.dart +++ b/tests/language_strong/await_backwards_compatibility_test.dart @@ -14,13 +14,13 @@ get await => 4; test0() async { var x = await 7; Expect.equals(7, x); - var await = 1; // //# await1: compile-time error + var await = 1; // /// await1: compile-time error } test1() async { var x = await 9; Expect.equals(9, x); - var y = await; // //# await2: compile-time error + var y = await; // /// await2: compile-time error } // For functions that are not declared with the async modifier we allow await to @@ -29,13 +29,13 @@ test1() async { test2() { var y = await; Expect.equals(4, y); - var x = await 1; // //# await3: compile-time error + var x = await 1; // /// await3: compile-time error } test3() { var await = 3; Expect.equals(3, await); - var x = await 1; // //# await4: compile-time error + var x = await 1; // /// await4: compile-time error } main() { diff --git a/tests/language_strong/bad_constructor_test.dart b/tests/language_strong/bad_constructor_test.dart index 0f3e6996d33..a1ed9a2bef8 100644 --- a/tests/language_strong/bad_constructor_test.dart +++ b/tests/language_strong/bad_constructor_test.dart @@ -4,20 +4,20 @@ class A { // Constructor may not be static. - static A(); // //# 00: compile-time error + static A(); // /// 00: compile-time error // Factory may not be static. - static factory A() { return null; } // //# 01: compile-time error + static factory A() { return null; } // /// 01: compile-time error // Named constructor may not conflict with names of methods and fields. var m; - A.m() { m = 0; } // //# 04: compile-time error + A.m() { m = 0; } // /// 04: compile-time error set q(var value) { m = q; } // No name conflict with q=. // The runtime error occurs because main calls new A() instead of new A.q(). - A.q(); // //# 05: runtime error + A.q(); // /// 05: runtime error - A.foo() : m = 0; // //# 06: compile-time error + A.foo() : m = 0; // /// 06: compile-time error int foo(int a, int b) => a + b * m; } diff --git a/tests/language_strong/bad_named_parameters2_test.dart b/tests/language_strong/bad_named_parameters2_test.dart index 371f2383b4c..76334b99920 100644 --- a/tests/language_strong/bad_named_parameters2_test.dart +++ b/tests/language_strong/bad_named_parameters2_test.dart @@ -22,11 +22,11 @@ class BadNamedParameters2Test { try { caught = false; // No formal parameter named b. - np.foo(b:25); // //# 01: static type warning + np.foo(b:25); // /// 01: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 01: continued + Expect.equals(true, caught); /// 01: continued } } diff --git a/tests/language_strong/bad_named_parameters_test.dart b/tests/language_strong/bad_named_parameters_test.dart index c82524ad952..06510e0e42e 100644 --- a/tests/language_strong/bad_named_parameters_test.dart +++ b/tests/language_strong/bad_named_parameters_test.dart @@ -24,43 +24,43 @@ class BadNamedParametersTest { try { caught = false; // Parameter b passed twice. - np.f42(10, 25, b:25); //# 01: static type warning + np.f42(10, 25, b:25); /// 01: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 01: continued + Expect.equals(true, caught); /// 01: continued try { caught = false; // Parameter x does not exist. - np.f42(10, 25, x:99); //# 02: static type warning + np.f42(10, 25, x:99); /// 02: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 02: continued + Expect.equals(true, caught); /// 02: continued try { caught = false; // Parameter b1 does not exist. - np.f52(10, b:25, b1:99, c:35); //# 03: static type warning + np.f52(10, b:25, b1:99, c:35); /// 03: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 03: continued + Expect.equals(true, caught); /// 03: continued try { caught = false; // Too many parameters. - np.f42(10, 20, 30, 40); //# 04: static type warning + np.f42(10, 20, 30, 40); /// 04: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 04: continued + Expect.equals(true, caught); /// 04: continued try { caught = false; // Too few parameters. - np.f42(b:25); //# 05: static type warning + np.f42(b:25); /// 05: static type warning } on NoSuchMethodError catch (e) { caught = true; } - Expect.equals(true, caught); //# 05: continued + Expect.equals(true, caught); /// 05: continued } } diff --git a/tests/language_strong/bad_override_test.dart b/tests/language_strong/bad_override_test.dart index 0f25206c942..e4ade0700f3 100644 --- a/tests/language_strong/bad_override_test.dart +++ b/tests/language_strong/bad_override_test.dart @@ -4,10 +4,10 @@ class Fisk { get fisk => null; - static // //# 01: static type warning + static // /// 01: static type warning set fisk(x) {} - static // //# 02: static type warning + static // /// 02: static type warning get hest => null; set hest(x) {} @@ -18,10 +18,10 @@ class Fisk { } class Hest extends Fisk { - static foo() {} // //# 03: compile-time error - field() {} // //# 04: compile-time error - var method; // //# 05: compile-time error - nullary(x) {} // //# 06: static type warning + static foo() {} // /// 03: compile-time error + field() {} // /// 04: compile-time error + var method; // /// 05: compile-time error + nullary(x) {} // /// 06: static type warning } main() { diff --git a/tests/language_strong/bad_raw_string_test.dart b/tests/language_strong/bad_raw_string_test.dart index 855f747e4cc..04bcb5499d6 100644 --- a/tests/language_strong/bad_raw_string_test.dart +++ b/tests/language_strong/bad_raw_string_test.dart @@ -5,19 +5,19 @@ main() { // Raw String may not contain newline (may not be multi-line). String x = '' - r' // //# 01: compile-time error -' // //# 01: continued - r" // //# 02: compile-time error -" // //# 02: continued + r' // /// 01: compile-time error +' // /// 01: continued + r" // /// 02: compile-time error +" // /// 02: continued // Test that a raw string containing just one character, a \n char, fails. // Enclose the test string in a bigger multiline string, except in case 03: - ''' // //# 03: compile-time error + ''' // /// 03: compile-time error """ - ''' // //# 03: continued + ''' // /// 03: continued r' ' - ''' // //# 03: continued + ''' // /// 03: continued """ - ''' // //# 03: continued + ''' // /// 03: continued ; } diff --git a/tests/language_strong/bit_operations_test.dart b/tests/language_strong/bit_operations_test.dart index a704f682970..882b8f1981f 100644 --- a/tests/language_strong/bit_operations_test.dart +++ b/tests/language_strong/bit_operations_test.dart @@ -93,19 +93,19 @@ void testLeftShift64Bit() { Expect.equals(0xffffffff, t << 0); Expect.equals(0x1fffffffe, t << 1); Expect.equals(0x7fffffff80000000, t << 31); - Expect.equals(0x10000000000000000, 2*(t+1) << 31); //# 01: static type warning - Expect.equals(0x20000000000000000, 4*(t+1) << 31); //# 02: static type warning + Expect.equals(0x10000000000000000, 2*(t+1) << 31); /// 01: static type warning + Expect.equals(0x20000000000000000, 4*(t+1) << 31); /// 02: static type warning Expect.equals(0x8000000000000000, (t+1) << 31); } void testLeftShift64BitWithOverflow1() { var t = 0xffffffff; - Expect.equals(0x10000000000000000, 2*(t+1) << 31); //# 03: static type warning + Expect.equals(0x10000000000000000, 2*(t+1) << 31); /// 03: static type warning } void testLeftShift64BitWithOverflow2() { var t = 0xffffffff; - Expect.equals(0x20000000000000000, 4*(t+1) << 31); //# 04: static type warning + Expect.equals(0x20000000000000000, 4*(t+1) << 31); /// 04: static type warning } void testLeftShift64BitWithOverflow3() { diff --git a/tests/language_strong/black_listed_test.dart b/tests/language_strong/black_listed_test.dart index 43e35546592..9eed1292220 100644 --- a/tests/language_strong/black_listed_test.dart +++ b/tests/language_strong/black_listed_test.dart @@ -7,74 +7,74 @@ // implemented or extended. // bool. -class MyBool implements bool {} // //# 01: compile-time error -abstract class MyBoolInterface implements bool default F { // //# 02: compile-time error - MyBoolInterface(); // //# 02: continued -} // //# 02: continued +class MyBool implements bool {} // /// 01: compile-time error +abstract class MyBoolInterface implements bool default F { // /// 02: compile-time error + MyBoolInterface(); // /// 02: continued +} // /// 02: continued // num. -class MyNum implements num {} // //# 03: compile-time error -abstract class MyNumInterface implements num default F { // //# 04: compile-time error - MyNumInterface(); // //# 04: continued -} // //# 04: continued +class MyNum implements num {} // /// 03: compile-time error +abstract class MyNumInterface implements num default F { // /// 04: compile-time error + MyNumInterface(); // /// 04: continued +} // /// 04: continued // int. -class MyInt implements int {} // //# 05: compile-time error -abstract class MyIntInterface implements int default F { // //# 06: compile-time error - MyIntInterface(); // //# 06: continued -} // //# 06: continued +class MyInt implements int {} // /// 05: compile-time error +abstract class MyIntInterface implements int default F { // /// 06: compile-time error + MyIntInterface(); // /// 06: continued +} // /// 06: continued // double. -class MyDouble implements double {} // //# 07: compile-time error -abstract class MyDoubleInterface implements double default F { // //# 08: compile-time error - MyDoubleInterface(); // //# 08: continued -} // //# 08: continued +class MyDouble implements double {} // /// 07: compile-time error +abstract class MyDoubleInterface implements double default F { // /// 08: compile-time error + MyDoubleInterface(); // /// 08: continued +} // /// 08: continued // String. -class MyString implements String {} // //# 09: compile-time error -abstract class MyStringInterface implements String default F { // //# 10: compile-time error - MyStringInterface(); // //# 10: continued -} // //# 10: continued +class MyString implements String {} // /// 09: compile-time error +abstract class MyStringInterface implements String default F { // /// 10: compile-time error + MyStringInterface(); // /// 10: continued +} // /// 10: continued // Function. class MyFunction implements Function {} class MyOtherFunction extends Function {} -abstract class MyFunctionInterface implements Function default F { // //# 12: compile-time error - MyFunctionInterface(); // //# 12: continued -} // //# 12: continued +abstract class MyFunctionInterface implements Function default F { // /// 12: compile-time error + MyFunctionInterface(); // /// 12: continued +} // /// 12: continued // dynamic. -class MyDynamic implements dynamic {} // //# 13: compile-time error -abstract class MyDynamicInterface implements dynamic default F { // //# 14: compile-time error - MyDynamicInterface(); // //# 14: continued -} // //# 14: continued +class MyDynamic implements dynamic {} // /// 13: compile-time error +abstract class MyDynamicInterface implements dynamic default F { // /// 14: compile-time error + MyDynamicInterface(); // /// 14: continued +} // /// 14: continued class F { - factory MyBoolInterface() { return null; } // //# 02: continued - factory MyNumInterface() { return null; } // //# 04: continued - factory MyIntInterface() { return null; } // //# 06: continued - factory MyDoubleInterface() { return null; } // //# 08: continued - factory MyStringInterface() { return null; } // //# 10: continued - factory MyFunctionInterface() { return null; } // //# 12: continued - factory MyDynamicInterface() { return null; } // //# 14: continued + factory MyBoolInterface() { return null; } // /// 02: continued + factory MyNumInterface() { return null; } // /// 04: continued + factory MyIntInterface() { return null; } // /// 06: continued + factory MyDoubleInterface() { return null; } // /// 08: continued + factory MyStringInterface() { return null; } // /// 10: continued + factory MyFunctionInterface() { return null; } // /// 12: continued + factory MyDynamicInterface() { return null; } // /// 14: continued } main() { - new MyBool(); // //# 01: continued - new MyBoolInterface(); // //# 02: continued - new MyNum(); // //# 03: continued - new MyNumInterface(); // //# 04: continued - new MyInt(); // //# 05: continued - new MyIntInterface(); // //# 06: continued - new MyDouble(); // //# 07: continued - new MyDoubleInterface(); // //# 08: continued - new MyString(); // //# 09: continued - new MyStringInterface(); // //# 10: continued + new MyBool(); // /// 01: continued + new MyBoolInterface(); // /// 02: continued + new MyNum(); // /// 03: continued + new MyNumInterface(); // /// 04: continued + new MyInt(); // /// 05: continued + new MyIntInterface(); // /// 06: continued + new MyDouble(); // /// 07: continued + new MyDoubleInterface(); // /// 08: continued + new MyString(); // /// 09: continued + new MyStringInterface(); // /// 10: continued new MyFunction(); new MyOtherFunction(); - new MyFunctionInterface(); //# 12: continued - new MyDynamic(); // //# 13: continued - new MyDynamicInterface(); // //# 14: continued + new MyFunctionInterface(); /// 12: continued + new MyDynamic(); // /// 13: continued + new MyDynamicInterface(); // /// 14: continued } diff --git a/tests/language_strong/bool_condition_check_test.dart b/tests/language_strong/bool_condition_check_test.dart index fcf82b8d2d2..facab4b338f 100644 --- a/tests/language_strong/bool_condition_check_test.dart +++ b/tests/language_strong/bool_condition_check_test.dart @@ -20,5 +20,5 @@ class Class { } main() { - Expect.equals('', new Class(a: null, b: null).field); //# 01: dynamic type error + Expect.equals('', new Class(a: null, b: null).field); /// 01: dynamic type error } \ No newline at end of file diff --git a/tests/language_strong/built_in_identifier_illegal_test.dart b/tests/language_strong/built_in_identifier_illegal_test.dart index 29af0ea59a0..f80abb15485 100644 --- a/tests/language_strong/built_in_identifier_illegal_test.dart +++ b/tests/language_strong/built_in_identifier_illegal_test.dart @@ -4,21 +4,21 @@ // Check that we cannot use a pseudo keyword at the class level code. // Pseudo keywords are not allowed to be used as class names. -class abstract { } // //# 01: compile-time error -class as { } // //# 19: compile-time error -class dynamic { } // //# 04: compile-time error -class export { } // //# 17: compile-time error -class external { } // //# 20: compile-time error -class factory { } // //# 05: compile-time error -class get { } // //# 06: compile-time error -class implements { } // //# 07: compile-time error -class import { } // //# 08: compile-time error -class library { } // //# 10: compile-time error -class operator { } // //# 12: compile-time error -class part { } // //# 18: compile-time error -class set { } // //# 13: compile-time error -class static { } // //# 15: compile-time error -class typedef { } // //# 16: compile-time error +class abstract { } // /// 01: compile-time error +class as { } // /// 19: compile-time error +class dynamic { } // /// 04: compile-time error +class export { } // /// 17: compile-time error +class external { } // /// 20: compile-time error +class factory { } // /// 05: compile-time error +class get { } // /// 06: compile-time error +class implements { } // /// 07: compile-time error +class import { } // /// 08: compile-time error +class library { } // /// 10: compile-time error +class operator { } // /// 12: compile-time error +class part { } // /// 18: compile-time error +class set { } // /// 13: compile-time error +class static { } // /// 15: compile-time error +class typedef { } // /// 16: compile-time error main() { } diff --git a/tests/language_strong/built_in_identifier_test.dart b/tests/language_strong/built_in_identifier_test.dart index 602d28c49d4..813ff08de1e 100644 --- a/tests/language_strong/built_in_identifier_test.dart +++ b/tests/language_strong/built_in_identifier_test.dart @@ -12,11 +12,11 @@ class PseudoKWTest { // This is a list of built-in identifiers from the Dart spec. // It sanity checks that these pseudo-keywords are legal identifiers. - var abstract = 0; // //# 01: ok + var abstract = 0; // /// 01: ok var as = 0; var dynamic = 0; var export = 0; - var external = 0; // //# 01: ok + var external = 0; // /// 01: ok var factory = 0; var get = 0; var implements = 0; @@ -25,7 +25,7 @@ class PseudoKWTest { var operator = 0; var part = 0; var set = 0; - var static = 0; // //# 01: ok + var static = 0; // /// 01: ok var typedef = 0; // "native" is a per-implementation extension that is not a part of the @@ -38,7 +38,7 @@ class PseudoKWTest { // attempt at complete coverage. { void factory(set) { - return; // //# 01: ok + return; // /// 01: ok } } @@ -47,16 +47,16 @@ class PseudoKWTest { } return - static + // //# 01: ok + static + // /// 01: ok library * operator; } } -typedef(x) => "typedef $x"; // //# 01: ok +typedef(x) => "typedef $x"; // /// 01: ok -static(abstract) { // //# 01: ok - return abstract == true; // //# 01: ok -} // //# 01: ok +static(abstract) { // /// 01: ok + return abstract == true; // /// 01: ok +} // /// 01: ok class A { var typedef = 0; @@ -65,14 +65,14 @@ class A { set(x) { typedef = x; } get() => typedef - 5; - static static() { // //# 01: ok - return 1; // //# 01: ok - } // //# 01: ok + static static() { // /// 01: ok + return 1; // /// 01: ok + } // /// 01: ok static check() { var o = new A(); o.set(55); Expect.equals(50, o.get()); - static(); // //# 01: ok + static(); // /// 01: ok } } @@ -81,11 +81,11 @@ class B { get get => set; set get(get) => set = 2 * get.get; - static() { // //# 01: ok - var set = new B(); // //# 01: ok - set.get = set; // //# 01: ok - Expect.equals(200, set.get); // //# 01: ok - } // //# 01: ok + static() { // /// 01: ok + var set = new B(); // /// 01: ok + set.get = set; // /// 01: ok + Expect.equals(200, set.get); // /// 01: ok + } // /// 01: ok int operator() { return 1; } @@ -102,13 +102,13 @@ class C { main() { PseudoKWTest.testMain(); A.check(); - new B().static(); // //# 01: ok + new B().static(); // /// 01: ok Expect.equals(1, new B().operator()); - Expect.equals(1, A.static()); // //# 01: ok - typedef("T"); // //# 01: ok - Expect.equals("typedef T", typedef("T")); // //# 01: ok - static("true"); // //# 01: ok - Expect.equals(false, static("true")); // //# 01: ok + Expect.equals(1, A.static()); // /// 01: ok + typedef("T"); // /// 01: ok + Expect.equals("typedef T", typedef("T")); // /// 01: ok + static("true"); // /// 01: ok + Expect.equals(false, static("true")); // /// 01: ok Expect.equals(5, C.operator); Expect.equals(null, C.get); C.set = 0; diff --git a/tests/language_strong/call_constructor_on_unresolvable_class_test.dart b/tests/language_strong/call_constructor_on_unresolvable_class_test.dart index caf9b0c4899..4864d8775c7 100644 --- a/tests/language_strong/call_constructor_on_unresolvable_class_test.dart +++ b/tests/language_strong/call_constructor_on_unresolvable_class_test.dart @@ -19,20 +19,20 @@ never() { main() { if (never()) { // These should not produce errors because the calls are never executed. - new A(); // //# 01: static type warning - new A.foo(); // //# 02: static type warning - new lib.A(); // //# 03: static type warning + new A(); // /// 01: static type warning + new A.foo(); // /// 02: static type warning + new lib.A(); // /// 03: static type warning } - new A(); // //# 04: static type warning, runtime error - new A.foo(); // //# 05: static type warning, runtime error - new lib.A(); // //# 06: static type warning, runtime error + new A(); // /// 04: static type warning, runtime error + new A.foo(); // /// 05: static type warning, runtime error + new lib.A(); // /// 06: static type warning, runtime error - var ex; // //# 07: static type warning - try { // //# 07: continued - new A(); // //# 07: continued - } catch (e) { // //# 07: continued - ex = e; // //# 07: continued - } // //# 07: continued - Expect.isTrue(ex != null); //# 07: continued + var ex; // /// 07: static type warning + try { // /// 07: continued + new A(); // /// 07: continued + } catch (e) { // /// 07: continued + ex = e; // /// 07: continued + } // /// 07: continued + Expect.isTrue(ex != null); /// 07: continued } diff --git a/tests/language_strong/call_non_method_field_test.dart b/tests/language_strong/call_non_method_field_test.dart index a8b2e8e5058..fdc1fe3da9a 100644 --- a/tests/language_strong/call_non_method_field_test.dart +++ b/tests/language_strong/call_non_method_field_test.dart @@ -14,10 +14,10 @@ class Hest extends Fisk { main() { Fisk x1 = new Fisk(); if (false) { - x1.i(); // //# 01: static type warning + x1.i(); // /// 01: static type warning } Hest x2 = new Hest(); if (false) { - x2.i(); // //# 02: static type warning + x2.i(); // /// 02: static type warning } } diff --git a/tests/language_strong/call_nonexistent_constructor_test.dart b/tests/language_strong/call_nonexistent_constructor_test.dart index aa0d75a6cd1..d3cf60a3b28 100644 --- a/tests/language_strong/call_nonexistent_constructor_test.dart +++ b/tests/language_strong/call_nonexistent_constructor_test.dart @@ -20,17 +20,17 @@ main() { new A.foo(42); try { // Args are evaluated before throwing NoSuchMethodError: - new A.bar(foo()); //# 01: static type warning + new A.bar(foo()); /// 01: static type warning } on NoSuchMethodError catch (e) { i = -1; } on String catch (e) { i = 1; } - Expect.equals(1, i); //# 01: continued + Expect.equals(1, i); /// 01: continued try { - new A(); //# 02: static type warning + new A(); /// 02: static type warning } on NoSuchMethodError catch (e) { i = 2; } - Expect.equals(2, i); //# 02: continued + Expect.equals(2, i); /// 02: continued } diff --git a/tests/language_strong/call_nonexistent_static_test.dart b/tests/language_strong/call_nonexistent_static_test.dart index 92662c3b160..ab4a651dc44 100644 --- a/tests/language_strong/call_nonexistent_static_test.dart +++ b/tests/language_strong/call_nonexistent_static_test.dart @@ -10,12 +10,12 @@ import "package:expect/expect.dart"; class C {} class D { - get hest => 1; // //# 04: continued - set hest(val) {} // //# 05: continued + get hest => 1; // /// 04: continued + set hest(val) {} // /// 05: continued } -get fisk => 2; //# 09: continued -set fisk(val) {} //# 10: continued +get fisk => 2; /// 09: continued +set fisk(val) {} /// 10: continued expectNsme([void fun()]) { if (fun != null) { @@ -28,75 +28,75 @@ alwaysThrows() { } test01() { - C.hest = 1; // //# 01: static type warning + C.hest = 1; // /// 01: static type warning } test02() { - C.hest; // //# 02: static type warning + C.hest; // /// 02: static type warning } test03() { - C.hest(); // //# 03: static type warning + C.hest(); // /// 03: static type warning } test04() { - D.hest = 1; // //# 04: static type warning + D.hest = 1; // /// 04: static type warning } test05() { - D.hest; // //# 05: static type warning + D.hest; // /// 05: static type warning } test06() { - fisk = 1; // //# 06: static type warning + fisk = 1; // /// 06: static type warning } test07() { - fisk; // //# 07: static type warning + fisk; // /// 07: static type warning } test08() { - fisk(); // //# 08: static type warning + fisk(); // /// 08: static type warning } test09() { - fisk = 1; // //# 09: static type warning + fisk = 1; // /// 09: static type warning } test10() { - fisk; // //# 10: static type warning + fisk; // /// 10: static type warning } main() { expectNsme(alwaysThrows); expectNsme( - test01 // //# 01: continued + test01 // /// 01: continued ); expectNsme( - test02 // //# 02: continued + test02 // /// 02: continued ); expectNsme( - test03 // //# 03: continued + test03 // /// 03: continued ); expectNsme( - test04 // //# 04: continued + test04 // /// 04: continued ); expectNsme( - test05 // //# 05: continued + test05 // /// 05: continued ); expectNsme( - test06 // //# 06: continued + test06 // /// 06: continued ); expectNsme( - test07 // //# 07: continued + test07 // /// 07: continued ); expectNsme( - test08 // //# 08: continued + test08 // /// 08: continued ); expectNsme( - test09 // //# 09: continued + test09 // /// 09: continued ); expectNsme( - test10 // //# 10: continued + test10 // /// 10: continued ); } diff --git a/tests/language_strong/call_through_getter_test.dart b/tests/language_strong/call_through_getter_test.dart index 0d4f34be354..38c7c07360a 100644 --- a/tests/language_strong/call_through_getter_test.dart +++ b/tests/language_strong/call_through_getter_test.dart @@ -31,10 +31,10 @@ class CallThroughGetterTest { Expect.equals(2, topLevel()); expectThrowsNoSuchMethod(() { - TOP_LEVEL_CONST(); //# static type warning + TOP_LEVEL_CONST(); /// static type warning }); expectThrowsNoSuchMethod(() { - (TOP_LEVEL_CONST)(); // //# static type warning + (TOP_LEVEL_CONST)(); // /// static type warning }); } diff --git a/tests/language_strong/call_type_literal_test.dart b/tests/language_strong/call_type_literal_test.dart index b90e131103b..d24e778d445 100644 --- a/tests/language_strong/call_type_literal_test.dart +++ b/tests/language_strong/call_type_literal_test.dart @@ -7,5 +7,5 @@ import "package:expect/expect.dart"; class C { void a() {} } void main() { - Expect.throws(() => C().a(), (e) => e is NoSuchMethodError); //# 01: static type warning + Expect.throws(() => C().a(), (e) => e is NoSuchMethodError); /// 01: static type warning } diff --git a/tests/language_strong/callable_test.dart b/tests/language_strong/callable_test.dart index ede9fa49934..ede87fc4704 100644 --- a/tests/language_strong/callable_test.dart +++ b/tests/language_strong/callable_test.dart @@ -36,8 +36,8 @@ main() { Y y = new Y(); Function g = y; // Should pass checked mode test F f0 = y; // Should pass checked mode test - F f1 = x; //# 00: dynamic type error, static type warning - G g0 = y; //# 01: dynamic type error, static type warning + F f1 = x; /// 00: dynamic type error, static type warning + G g0 = y; /// 01: dynamic type error, static type warning Expect.equals(f(), 42); Expect.equals(g(100), 187); diff --git a/tests/language_strong/cascade_test.dart b/tests/language_strong/cascade_test.dart index e9bc29d5068..7600e1c333c 100644 --- a/tests/language_strong/cascade_test.dart +++ b/tests/language_strong/cascade_test.dart @@ -65,7 +65,7 @@ main() { ..import()..check(4, 7) ..["swap"]()()()..check(7, 4); a.check(7,4); - a..(42); // //# 01: compile-time error - a..37; // //# 02: compile-time error - a.."foo"; // //# 03: compile-time error + a..(42); // /// 01: compile-time error + a..37; // /// 02: compile-time error + a.."foo"; // /// 03: compile-time error } diff --git a/tests/language_strong/cast_test.dart b/tests/language_strong/cast_test.dart index c420a900c7c..4b49bf52b18 100644 --- a/tests/language_strong/cast_test.dart +++ b/tests/language_strong/cast_test.dart @@ -35,42 +35,42 @@ main() { Expect.equals(42, (od as D).foo); Expect.equals(37, (od as D).bar); Expect.equals(37, ((od as C) as D).bar); - (oc as D).foo; // //# 01: runtime error + (oc as D).foo; // /// 01: runtime error (on as D).toString(); - (on as D).foo; // //# 02: runtime error - (on as C).foo; // //# 03: runtime error - oc.foo; // //# 04: static type warning - od.foo; // //# 05: static type warning + (on as D).foo; // /// 02: runtime error + (on as C).foo; // /// 03: runtime error + oc.foo; // /// 04: static type warning + od.foo; // /// 05: static type warning (on as Object).toString(); (oc as Object).toString(); (od as Object).toString(); (on as dynamic).toString(); - (on as dynamic).foo; // //# 07: runtime error + (on as dynamic).foo; // /// 07: runtime error (oc as dynamic).foo; (od as dynamic).foo; - (oc as dynamic).bar; // //# 08: runtime error + (oc as dynamic).bar; // /// 08: runtime error (od as dynamic).bar; C c = oc as C; c = od as C; c = oc; D d = od as D; - d = oc as D; // //# 10: runtime error + d = oc as D; // /// 10: runtime error d = od; (ol as List)[0]; (ol as List)[0]; (ol as dynamic)[0]; - (ol as String).length; // //# 12: runtime error + (ol as String).length; // /// 12: runtime error int x = (ol as List)[0]; (ol as List)[0] = (oi as int); (os as String).length; (os as dynamic).length; - (oi as String).length; // //# 13: runtime error - (os as List).length; // //# 14: runtime error + (oi as String).length; // /// 13: runtime error + (os as List).length; // /// 14: runtime error (oi as int) + 2; - (oi as List).length; // //# 15: runtime error + (oi as List).length; // /// 15: runtime error } diff --git a/tests/language_strong/check_member_static_test.dart b/tests/language_strong/check_member_static_test.dart index e89fb62f41f..e66c37da0bf 100644 --- a/tests/language_strong/check_member_static_test.dart +++ b/tests/language_strong/check_member_static_test.dart @@ -12,8 +12,8 @@ class B extends A { } class C extends B { - var a; //# 01: static type warning - static var b; //# 02: compile-time error + var a; /// 01: static type warning + static var b; /// 02: compile-time error } void main() { diff --git a/tests/language_strong/check_method_override_test.dart b/tests/language_strong/check_method_override_test.dart index c0275a6de72..bfd6e4a340b 100644 --- a/tests/language_strong/check_method_override_test.dart +++ b/tests/language_strong/check_method_override_test.dart @@ -8,8 +8,8 @@ class A { } class C extends A { - f() {} //# 01: static type warning - foo(var a, [x]) {} //# 02: static type warning + f() {} /// 01: static type warning + foo(var a, [x]) {} /// 02: static type warning } main() { diff --git a/tests/language_strong/checked_null_test.dart b/tests/language_strong/checked_null_test.dart index 36ffd7b7d96..95df12b2e7c 100644 --- a/tests/language_strong/checked_null_test.dart +++ b/tests/language_strong/checked_null_test.dart @@ -13,7 +13,7 @@ class A { } main() { - Expect.throws(bar); //# 01: continued + Expect.throws(bar); /// 01: continued } bar() { @@ -21,5 +21,5 @@ bar() { // receiver type is a typedef. Some code in the dart2js backend were // not dealing correctly with typedefs and lead the compiler to // crash. - new A().a.foo(); //# 01: static type warning + new A().a.foo(); /// 01: static type warning } diff --git a/tests/language_strong/checked_setter3_test.dart b/tests/language_strong/checked_setter3_test.dart index 21585f6e5e2..2af3a0dd152 100644 --- a/tests/language_strong/checked_setter3_test.dart +++ b/tests/language_strong/checked_setter3_test.dart @@ -19,11 +19,11 @@ class A { } class B { - T field = 42; //# 01: static type warning + T field = 42; /// 01: static type warning } class C { - T field = 42; //# 02: static type warning + T field = 42; /// 02: static type warning } main() { @@ -33,11 +33,11 @@ main() { var s = 'foo'; if (inCheckedMode) { Expect.throws(() => a.field = i, (e) => e is TypeError); - Expect.throws(() => new B(), (e) => e is TypeError); //# 01: continued - Expect.throws(() => c.field = s, (e) => e is TypeError); //# 02: continued + Expect.throws(() => new B(), (e) => e is TypeError); /// 01: continued + Expect.throws(() => c.field = s, (e) => e is TypeError); /// 02: continued } else { a.field = i; - new B(); //# 01: continued - c.field = s; //# 02: continued + new B(); /// 01: continued + c.field = s; /// 02: continued } } diff --git a/tests/language_strong/class_cycle2_test.dart b/tests/language_strong/class_cycle2_test.dart index 2b1bb6576ea..00ad363c552 100644 --- a/tests/language_strong/class_cycle2_test.dart +++ b/tests/language_strong/class_cycle2_test.dart @@ -8,11 +8,11 @@ class C extends B {} class A extends B {} class B - extends A // //# 01: compile-time error - extends A // //# 02: compile-time error + extends A // /// 01: compile-time error + extends A // /// 02: compile-time error {} main() { - new C(); // //# 01: continued - new List(); // //# 02: continued + new C(); // /// 01: continued + new List(); // /// 02: continued } diff --git a/tests/language_strong/class_cycle_test.dart b/tests/language_strong/class_cycle_test.dart index 8b58e2bb9e1..18be64c3a95 100644 --- a/tests/language_strong/class_cycle_test.dart +++ b/tests/language_strong/class_cycle_test.dart @@ -12,19 +12,19 @@ class C { } class Bar - extends Foo // //# 00: compile-time error - implements Foo // //# 01: compile-time error + extends Foo // /// 00: compile-time error + implements Foo // /// 01: compile-time error { } class ImplementsC implements C -, C // //# 02: compile-time error +, C // /// 02: compile-time error {} // Spec says: It is a compile-time error if the superclass // of a class C appears in the implements clause of C. class ExtendsC extends C -implements C // //# 03: compile-time error +implements C // /// 03: compile-time error {} main() { diff --git a/tests/language_strong/class_keyword_test.dart b/tests/language_strong/class_keyword_test.dart index bac7831a72c..ac2e8921314 100644 --- a/tests/language_strong/class_keyword_test.dart +++ b/tests/language_strong/class_keyword_test.dart @@ -6,6 +6,6 @@ class foo {} void main() { - int class = 10; //# 01: compile-time error - print("$class"); //# 02: compile-time error + int class = 10; /// 01: compile-time error + print("$class"); /// 02: compile-time error } diff --git a/tests/language_strong/class_literal_test.dart b/tests/language_strong/class_literal_test.dart index aa109456143..58de6dd3bc0 100644 --- a/tests/language_strong/class_literal_test.dart +++ b/tests/language_strong/class_literal_test.dart @@ -23,30 +23,30 @@ main() { Expect.isFalse(Class == null); // Verify that dereferencing a class literal is a runtime error. - Expect.throws(() { Class(); }, (e) => e is NoSuchMethodError); //# 01: static type warning - Expect.throws(() { Class[0]; }, (e) => e is NoSuchMethodError); //# 02: static type warning - Expect.throws(() { var x = Class(); }, (e) => e is NoSuchMethodError); //# 03: static type warning - Expect.throws(() { var x = Class[0]; }, (e) => e is NoSuchMethodError); //# 04: static type warning - Expect.throws(() { var x = Class[0].field; }, (e) => e is NoSuchMethodError); //# 05: static type warning - Expect.throws(() { var x = Class[0].method(); }, (e) => e is NoSuchMethodError); //# 06: static type warning - Expect.throws(() { foo(Class()); }, (e) => e is NoSuchMethodError); //# 07: static type warning - Expect.throws(() { foo(Class[0]); }, (e) => e is NoSuchMethodError); //# 08: static type warning - Expect.throws(() { foo(Class[0].field); }, (e) => e is NoSuchMethodError); //# 09: static type warning - Expect.throws(() { foo(Class[0].method()); }, (e) => e is NoSuchMethodError); //# 10: static type warning - Expect.throws(() { Class[0] = 91; }, (e) => e is NoSuchMethodError); //# 11: static type warning - Expect.throws(() { Class++; }, (e) => e is NoSuchMethodError); //# 12: static type warning - Expect.throws(() { ++Class; }, (e) => e is NoSuchMethodError); //# 13: static type warning - Expect.throws(() { Class[0] += 3; }, (e) => e is NoSuchMethodError); //# 14: static type warning - Expect.throws(() { ++Class[0]; }, (e) => e is NoSuchMethodError); //# 15: static type warning - Expect.throws(() { Class[0]++; }, (e) => e is NoSuchMethodError); //# 16: static type warning - Expect.throws(() { Class.method(); }, (e) => e is NoSuchMethodError); //# 17: static type warning - Expect.throws(() { Class.field; }, (e) => e is NoSuchMethodError); //# 18: static type warning - Expect.throws(() { var x = Class.method(); }, (e) => e is NoSuchMethodError); //# 19: static type warning - Expect.throws(() { var x = Class.field; }, (e) => e is NoSuchMethodError); //# 20: static type warning - Expect.throws(() { foo(Class.method()); }, (e) => e is NoSuchMethodError); //# 21: static type warning - Expect.throws(() { foo(Class.field); }, (e) => e is NoSuchMethodError); //# 22: static type warning - Expect.throws(() { Class / 3; }, (e) => e is NoSuchMethodError); //# 23: static type warning - Expect.throws(() { Class += 3; }, (e) => e is NoSuchMethodError); //# 24: static type warning + Expect.throws(() { Class(); }, (e) => e is NoSuchMethodError); /// 01: static type warning + Expect.throws(() { Class[0]; }, (e) => e is NoSuchMethodError); /// 02: static type warning + Expect.throws(() { var x = Class(); }, (e) => e is NoSuchMethodError); /// 03: static type warning + Expect.throws(() { var x = Class[0]; }, (e) => e is NoSuchMethodError); /// 04: static type warning + Expect.throws(() { var x = Class[0].field; }, (e) => e is NoSuchMethodError); /// 05: static type warning + Expect.throws(() { var x = Class[0].method(); }, (e) => e is NoSuchMethodError); /// 06: static type warning + Expect.throws(() { foo(Class()); }, (e) => e is NoSuchMethodError); /// 07: static type warning + Expect.throws(() { foo(Class[0]); }, (e) => e is NoSuchMethodError); /// 08: static type warning + Expect.throws(() { foo(Class[0].field); }, (e) => e is NoSuchMethodError); /// 09: static type warning + Expect.throws(() { foo(Class[0].method()); }, (e) => e is NoSuchMethodError); /// 10: static type warning + Expect.throws(() { Class[0] = 91; }, (e) => e is NoSuchMethodError); /// 11: static type warning + Expect.throws(() { Class++; }, (e) => e is NoSuchMethodError); /// 12: static type warning + Expect.throws(() { ++Class; }, (e) => e is NoSuchMethodError); /// 13: static type warning + Expect.throws(() { Class[0] += 3; }, (e) => e is NoSuchMethodError); /// 14: static type warning + Expect.throws(() { ++Class[0]; }, (e) => e is NoSuchMethodError); /// 15: static type warning + Expect.throws(() { Class[0]++; }, (e) => e is NoSuchMethodError); /// 16: static type warning + Expect.throws(() { Class.method(); }, (e) => e is NoSuchMethodError); /// 17: static type warning + Expect.throws(() { Class.field; }, (e) => e is NoSuchMethodError); /// 18: static type warning + Expect.throws(() { var x = Class.method(); }, (e) => e is NoSuchMethodError); /// 19: static type warning + Expect.throws(() { var x = Class.field; }, (e) => e is NoSuchMethodError); /// 20: static type warning + Expect.throws(() { foo(Class.method()); }, (e) => e is NoSuchMethodError); /// 21: static type warning + Expect.throws(() { foo(Class.field); }, (e) => e is NoSuchMethodError); /// 22: static type warning + Expect.throws(() { Class / 3; }, (e) => e is NoSuchMethodError); /// 23: static type warning + Expect.throws(() { Class += 3; }, (e) => e is NoSuchMethodError); /// 24: static type warning // Verify that a class literal isn't a string literal. Expect.notEquals(Class, "Class"); @@ -56,5 +56,5 @@ main() { var y = Class; Expect.isTrue(y.toString() is String); - Expect.throws(() { Class.toString(); }, (e) => e is NoSuchMethodError); //# 25: static type warning + Expect.throws(() { Class.toString(); }, (e) => e is NoSuchMethodError); /// 25: static type warning } diff --git a/tests/language_strong/class_override_test.dart b/tests/language_strong/class_override_test.dart index b14101e61e4..57b736029f3 100644 --- a/tests/language_strong/class_override_test.dart +++ b/tests/language_strong/class_override_test.dart @@ -10,14 +10,14 @@ class A { } class B extends A { - foo(a) {} // //# 00: static type warning + foo(a) {} // /// 00: static type warning } main() { B instance = new B(); try { instance.foo(); - } on NoSuchMethodError catch (error) { // //# 00: continued + } on NoSuchMethodError catch (error) { // /// 00: continued } finally { } print("Success"); diff --git a/tests/language_strong/class_syntax_test.dart b/tests/language_strong/class_syntax_test.dart index ea431389572..f14822d399f 100644 --- a/tests/language_strong/class_syntax_test.dart +++ b/tests/language_strong/class_syntax_test.dart @@ -7,6 +7,6 @@ main() { } class ClassSyntaxTest { - /* //# 01: compile-time error + /* /// 01: compile-time error } -*/ //# 01: continued +*/ /// 01: continued diff --git a/tests/language_strong/closure_type_test.dart b/tests/language_strong/closure_type_test.dart index ba11f8ab90d..81089c122d6 100644 --- a/tests/language_strong/closure_type_test.dart +++ b/tests/language_strong/closure_type_test.dart @@ -11,7 +11,7 @@ import 'dart:math' as math; class Math { static - int // //# 01: static type warning + int // /// 01: static type warning sqrt(x) => math.sqrt(x); } diff --git a/tests/language_strong/code_after_try_is_executed_test.dart b/tests/language_strong/code_after_try_is_executed_test.dart index 57ffd842cbe..010cc6a3a2a 100644 --- a/tests/language_strong/code_after_try_is_executed_test.dart +++ b/tests/language_strong/code_after_try_is_executed_test.dart @@ -15,5 +15,5 @@ main() { exception = ex; } Expect.isTrue(exception is String); - throw 'foo'; //# 01: runtime error + throw 'foo'; /// 01: runtime error } diff --git a/tests/language_strong/compile_time_constant10_test.dart b/tests/language_strong/compile_time_constant10_test.dart index 6d61278b050..a7a687f28de 100644 --- a/tests/language_strong/compile_time_constant10_test.dart +++ b/tests/language_strong/compile_time_constant10_test.dart @@ -86,14 +86,14 @@ const falseTests = const [ ]; // Not a constant if it's not written 'identical'. -const idtest = id(i1, i2); // //# 01: compile-time error +const idtest = id(i1, i2); // /// 01: compile-time error // Not a constant if aliased? (Current interpretation, waiting for // confirmation). -class T { // //# 02: compile-time error - static const identical = id; // //# 02: continued - static const idtest2 = identical(i1, i2); // //# 02: continued -} // //# 02: continued +class T { // /// 02: compile-time error + static const identical = id; // /// 02: continued + static const idtest2 = identical(i1, i2); // /// 02: continued +} // /// 02: continued main() { for (int i = 0; i < trueTests.length; i++) { @@ -103,7 +103,7 @@ main() { falseTests[i].test(Expect.isFalse, "false[$i]"); } - var x = idtest; // //# 01: continued - var x = T.idtest2; // //# 02: continued + var x = idtest; // /// 01: continued + var x = T.idtest2; // /// 02: continued } diff --git a/tests/language_strong/compile_time_constant13_test.dart b/tests/language_strong/compile_time_constant13_test.dart index 89acf62fcf4..b304132d2be 100644 --- a/tests/language_strong/compile_time_constant13_test.dart +++ b/tests/language_strong/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 + 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 + var x; // /// 03: compile-time error + get x => null; /// 04: 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_strong/compile_time_constant_arguments_test.dart b/tests/language_strong/compile_time_constant_arguments_test.dart index 891457c9eff..7a8c8a28dc9 100644 --- a/tests/language_strong/compile_time_constant_arguments_test.dart +++ b/tests/language_strong/compile_time_constant_arguments_test.dart @@ -10,13 +10,13 @@ class A { main() { const A(1); - const A(); //# 01: compile-time error, static type warning - const A(1, 2); //# 02: compile-time error, static type warning + const A(); /// 01: compile-time error, static type warning + const A(1, 2); /// 02: compile-time error, static type warning const A.named(); - const A.named(b: 1); //# 03: compile-time error, static type warning - const A.named(a: 1, a: 2); //# 04: compile-time error, static type warning - const A.named(a: 1, b: 2); //# 05: compile-time error, static type warning + const A.named(b: 1); /// 03: compile-time error, static type warning + const A.named(a: 1, a: 2); /// 04: compile-time error, static type warning + const A.named(a: 1, b: 2); /// 05: compile-time error, static type warning const A.optional(); const A.optional(42); - const A.optional(42, 54); //# 06: compile-time error, static type warning + const A.optional(42, 54); /// 06: compile-time error, static type warning } diff --git a/tests/language_strong/compile_time_constant_c_test.dart b/tests/language_strong/compile_time_constant_c_test.dart index 1a84633c367..72bacfbeb5b 100644 --- a/tests/language_strong/compile_time_constant_c_test.dart +++ b/tests/language_strong/compile_time_constant_c_test.dart @@ -6,13 +6,13 @@ const m0 = const { 499: 400 + 99 }; const m1 = const { - "foo" + "bar": 42 // //# 01: ok + "foo" + "bar": 42 // /// 01: ok }; const m2 = const { - "foo" * 4: 42 // //# 02: compile-time error + "foo" * 4: 42 // /// 02: compile-time error }; const m3 = const { - "foo".codeUnitAt(0): 42 // //# 03: compile-time error + "foo".codeUnitAt(0): 42 // /// 03: compile-time error }; use(x) => x; diff --git a/tests/language_strong/compile_time_constant_checked2_test.dart b/tests/language_strong/compile_time_constant_checked2_test.dart index 3a9a55eaa72..52cfc413cf3 100644 --- a/tests/language_strong/compile_time_constant_checked2_test.dart +++ b/tests/language_strong/compile_time_constant_checked2_test.dart @@ -4,26 +4,26 @@ class A { final int x; - const A.a1() : x = 'foo'; //# 01: continued + const A.a1() : x = 'foo'; /// 01: continued const A.a2(this.x); - const A.a3([this.x = 'foo']); //# 03: continued - const A.a4(String this.x); //# 04: continued - const A.a5(String x) : this.x = x; //# 05: continued + const A.a3([this.x = 'foo']); /// 03: continued + const A.a4(String this.x); /// 04: continued + const A.a5(String x) : this.x = x; /// 05: continued const A.a6(int x) : this.x = x; } -const a1 = const A.a1(); //# 01: static type warning, checked mode compile-time error -const a2 = const A.a2('foo'); //# 02: static type warning, checked mode compile-time error -const a3 = const A.a3(); //# 03: static type warning, checked mode compile-time error -const a4 = const A.a4('foo'); //# 04: static type warning, checked mode compile-time error -const a5 = const A.a5('foo'); //# 05: static type warning, checked mode compile-time error -const a6 = const A.a6('foo'); //# 06: static type warning, checked mode compile-time error +const a1 = const A.a1(); /// 01: static type warning, checked mode compile-time error +const a2 = const A.a2('foo'); /// 02: static type warning, checked mode compile-time error +const a3 = const A.a3(); /// 03: static type warning, checked mode compile-time error +const a4 = const A.a4('foo'); /// 04: static type warning, checked mode compile-time error +const a5 = const A.a5('foo'); /// 05: static type warning, checked mode compile-time error +const a6 = const A.a6('foo'); /// 06: static type warning, checked mode compile-time error main() { - print(a1); //# 01: continued - print(a2); //# 02: continued - print(a3); //# 03: continued - print(a4); //# 04: continued - print(a5); //# 05: continued - print(a6); //# 06: continued + print(a1); /// 01: continued + print(a2); /// 02: continued + print(a3); /// 03: continued + print(a4); /// 04: continued + print(a5); /// 05: continued + print(a6); /// 06: continued } diff --git a/tests/language_strong/compile_time_constant_checked3_test.dart b/tests/language_strong/compile_time_constant_checked3_test.dart index 8b9e04c8c37..336da4606e3 100644 --- a/tests/language_strong/compile_time_constant_checked3_test.dart +++ b/tests/language_strong/compile_time_constant_checked3_test.dart @@ -4,26 +4,26 @@ class A { final int x; - const A.a1() : x = 'foo'; //# 01: continued + const A.a1() : x = 'foo'; /// 01: continued const A.a2(this.x); - const A.a3([this.x = 'foo']); //# 03: continued - const A.a4(String this.x); //# 04: continued - const A.a5(String x) : this.x = x; //# 05: continued + const A.a3([this.x = 'foo']); /// 03: continued + const A.a4(String this.x); /// 04: continued + const A.a5(String x) : this.x = x; /// 05: continued const A.a6(int x) : this.x = x; } -var a1 = const A.a1(); //# 01: static type warning, checked mode compile-time error -var a2 = const A.a2('foo'); //# 02: static type warning, checked mode compile-time error -var a3 = const A.a3(); //# 03: static type warning, checked mode compile-time error -var a4 = const A.a4('foo'); //# 04: static type warning, checked mode compile-time error -var a5 = const A.a5('foo'); //# 05: static type warning, checked mode compile-time error -var a6 = const A.a6('foo'); //# 06: static type warning, checked mode compile-time error +var a1 = const A.a1(); /// 01: static type warning, checked mode compile-time error +var a2 = const A.a2('foo'); /// 02: static type warning, checked mode compile-time error +var a3 = const A.a3(); /// 03: static type warning, checked mode compile-time error +var a4 = const A.a4('foo'); /// 04: static type warning, checked mode compile-time error +var a5 = const A.a5('foo'); /// 05: static type warning, checked mode compile-time error +var a6 = const A.a6('foo'); /// 06: static type warning, checked mode compile-time error main() { - print(a1); //# 01: continued - print(a2); //# 02: continued - print(a3); //# 03: continued - print(a4); //# 04: continued - print(a5); //# 05: continued - print(a6); //# 06: continued + print(a1); /// 01: continued + print(a2); /// 02: continued + print(a3); /// 03: continued + print(a4); /// 04: continued + print(a5); /// 05: continued + print(a6); /// 06: continued } diff --git a/tests/language_strong/compile_time_constant_checked4_test.dart b/tests/language_strong/compile_time_constant_checked4_test.dart index 5cbff432e4b..f271e775f5f 100644 --- a/tests/language_strong/compile_time_constant_checked4_test.dart +++ b/tests/language_strong/compile_time_constant_checked4_test.dart @@ -5,13 +5,13 @@ class A { final _x; const A.a1( - String //# 01: checked mode compile-time error, static type warning + String /// 01: checked mode compile-time error, static type warning x) : this.a2(x); const A.a2( - String //# 02: checked mode compile-time error + String /// 02: checked mode compile-time error x) : this.a3(x); const A.a3( - String //# 03: checked mode compile-time error + String /// 03: checked mode compile-time error x) : _x = x; } diff --git a/tests/language_strong/compile_time_constant_checked5_test.dart b/tests/language_strong/compile_time_constant_checked5_test.dart index d370dd28ce5..d2a4aa3b00e 100644 --- a/tests/language_strong/compile_time_constant_checked5_test.dart +++ b/tests/language_strong/compile_time_constant_checked5_test.dart @@ -20,51 +20,51 @@ class D extends B implements C { } class Test1 { - final A x = const A(); //# 01: ok - final A x = const B(); //# 02: ok - final B x = const A(); //# 03: checked mode compile-time error - final B x = const C(); //# 04: checked mode compile-time error, static type warning - final B x = const C.d(); //# 05: static type warning + final A x = const A(); /// 01: ok + final A x = const B(); /// 02: ok + final B x = const A(); /// 03: checked mode compile-time error + final B x = const C(); /// 04: checked mode compile-time error, static type warning + final B x = const C.d(); /// 05: static type warning const Test1(); } // Will be instantiated with U=A and V=B. class Test2 { - final U x = const A(); //# 06: static type warning - final U x = const B(); //# 07: static type warning - final V x = const A(); //# 08: checked mode compile-time error, static type warning - final V x = const C(); //# 09: checked mode compile-time error, static type warning - final V x = const C.d(); //# 10: static type warning + final U x = const A(); /// 06: static type warning + final U x = const B(); /// 07: static type warning + final V x = const A(); /// 08: checked mode compile-time error, static type warning + final V x = const C(); /// 09: checked mode compile-time error, static type warning + final V x = const C.d(); /// 10: static type warning const Test2(); } // Will be instantiated with U=A and V=B. class Test3 { - final U x = const A(); //# 11: ok - final U x = const B(); //# 12: static type warning - final V x = const A(); //# 13: checked mode compile-time error - final V x = const C(); //# 14: checked mode compile-time error, static type warning - final V x = const C.d(); //# 15: static type warning + final U x = const A(); /// 11: ok + final U x = const B(); /// 12: static type warning + final V x = const A(); /// 13: checked mode compile-time error + final V x = const C(); /// 14: checked mode compile-time error, static type warning + final V x = const C.d(); /// 15: static type warning const Test3(); } // Will be instantiated with U=A and V=B. class Test4 { - final U x = const A(); //# 16: ok - final U x = const B(); //# 17: static type warning - final V x = const A(); //# 18: checked mode compile-time error - final V x = const C(); //# 19: checked mode compile-time error, static type warning - final V x = const C.d(); //# 20: static type warning + final U x = const A(); /// 16: ok + final U x = const B(); /// 17: static type warning + final V x = const A(); /// 18: checked mode compile-time error + final V x = const C(); /// 19: checked mode compile-time error, static type warning + final V x = const C.d(); /// 20: static type warning const Test4(); } // Will be instantiated with U=dynamic and V=dynamic. class Test5 { - final U x = const A(); //# 21: ok - final U x = const B(); //# 22: static type warning - final V x = const A(); //# 23: ok - final V x = const C(); //# 24: static type warning - final V x = const C.d(); //# 25: static type warning + final U x = const A(); /// 21: ok + final U x = const B(); /// 22: static type warning + final V x = const A(); /// 23: ok + final V x = const C(); /// 24: static type warning + final V x = const C.d(); /// 25: static type warning const Test5(); } diff --git a/tests/language_strong/compile_time_constant_checked_test.dart b/tests/language_strong/compile_time_constant_checked_test.dart index bff157e5052..26c0ecc6163 100644 --- a/tests/language_strong/compile_time_constant_checked_test.dart +++ b/tests/language_strong/compile_time_constant_checked_test.dart @@ -2,12 +2,12 @@ // 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. -final int x = 'foo'; //# 01: static type warning, dynamic type error -const int y = 'foo'; //# 02: static type warning, checked mode compile-time error -int z = 'foo'; //# 03: static type warning, dynamic type error +final int x = 'foo'; /// 01: static type warning, dynamic type error +const int y = 'foo'; /// 02: static type warning, checked mode compile-time error +int z = 'foo'; /// 03: static type warning, dynamic type error main() { - print(x); //# 01: continued - print(y); //# 02: continued - print(z); //# 03: continued + print(x); /// 01: continued + print(y); /// 02: continued + print(z); /// 03: continued } diff --git a/tests/language_strong/compile_time_constant_k_test.dart b/tests/language_strong/compile_time_constant_k_test.dart index 9014ce62e87..ebbbb5941f1 100644 --- a/tests/language_strong/compile_time_constant_k_test.dart +++ b/tests/language_strong/compile_time_constant_k_test.dart @@ -5,14 +5,14 @@ import "package:expect/expect.dart"; const x = const { - 'a': 3, // //# 01: static type warning + 'a': 3, // /// 01: static type warning 'a': 4 }; -const y = const { 'a': 10, 'b': 11, 'a': 12, // //# 02: static type warning - 'b': 13, 'a': 14 }; // //# 02: continued +const y = const { 'a': 10, 'b': 11, 'a': 12, // /// 02: static type warning + 'b': 13, 'a': 14 }; // /// 02: continued const z = const { - '__proto__': 496, // //# 03: static type warning - '__proto__': 497, // //# 03: continued - '__proto__': 498, // //# 03: continued + '__proto__': 496, // /// 03: static type warning + '__proto__': 497, // /// 03: continued + '__proto__': 498, // /// 03: continued '__proto__': 499 }; const x2 = const { 'a': 4 }; @@ -21,6 +21,6 @@ const z2 = const { '__proto__': 499 }; main() { Expect.identical(x2, x); - Expect.identical(y2, y); // //# 02: continued + Expect.identical(y2, y); // /// 02: continued Expect.identical(z2, z); } diff --git a/tests/language_strong/compile_time_constant_o_test.dart b/tests/language_strong/compile_time_constant_o_test.dart index c7a5afc533e..2438881d889 100644 --- a/tests/language_strong/compile_time_constant_o_test.dart +++ b/tests/language_strong/compile_time_constant_o_test.dart @@ -9,10 +9,10 @@ const str = "foo"; const m1 = const { "foo": 499 }; const m2 = const { "$str": 499 }; const m3 = const { - "$str": 42, //# 01: static type warning + "$str": 42, /// 01: static type warning "foo": 499 }; const m4 = const { - "foo": 42, //# 02: static type warning + "foo": 42, /// 02: static type warning "$str": 499 }; const m5 = const { "f" "o" "o": 499 }; diff --git a/tests/language_strong/compile_time_constant_p_test.dart b/tests/language_strong/compile_time_constant_p_test.dart index c6934eb7b28..37cc9c80ef3 100644 --- a/tests/language_strong/compile_time_constant_p_test.dart +++ b/tests/language_strong/compile_time_constant_p_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; class A { const A( - this.x // //# 01: compile-time error + this.x // /// 01: compile-time error ); final x = null; } diff --git a/tests/language_strong/compile_time_constant_r_test.dart b/tests/language_strong/compile_time_constant_r_test.dart index 060c5bbf4ca..b186f7ea144 100644 --- a/tests/language_strong/compile_time_constant_r_test.dart +++ b/tests/language_strong/compile_time_constant_r_test.dart @@ -3,18 +3,18 @@ // BSD-style license that can be found in the LICENSE file. const x = - throw // //# 01: compile-time error + throw // /// 01: compile-time error "x"; const y = const {0: - throw // //# 02: compile-time error + throw // /// 02: compile-time error "y"}; main() { print(x); print(y); const z = - throw // //# 03: compile-time error + throw // /// 03: compile-time error 1+1+1; print(z); } diff --git a/tests/language_strong/compile_time_constant_test.dart b/tests/language_strong/compile_time_constant_test.dart index 8c641bd3a30..ae3333d35a7 100644 --- a/tests/language_strong/compile_time_constant_test.dart +++ b/tests/language_strong/compile_time_constant_test.dart @@ -5,10 +5,10 @@ class Bad { int foo; final int bar = - foo //# 01: compile-time error + foo /// 01: compile-time error -1; static const int toto = - bar //# 02: compile-time error + bar /// 02: compile-time error -3; } diff --git a/tests/language_strong/conditional_method_invocation_test.dart b/tests/language_strong/conditional_method_invocation_test.dart index 5131d250aaa..0dd219deea7 100644 --- a/tests/language_strong/conditional_method_invocation_test.dart +++ b/tests/language_strong/conditional_method_invocation_test.dart @@ -30,35 +30,35 @@ main() { nullC()?.f(null); // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - Expect.equals(null, nullC()?.f(bad())); //# 01: ok - Expect.equals(1, new C()?.f(() => 1)); //# 02: ok + Expect.equals(null, nullC()?.f(bad())); /// 01: ok + Expect.equals(1, new C()?.f(() => 1)); /// 02: ok // C?.m(...) is equivalent to C.m(...). - Expect.equals(1, C?.staticF(() => 1)); //# 14: ok - Expect.equals(1, h.C?.staticF(() => 1)); //# 15: ok + Expect.equals(1, C?.staticF(() => 1)); /// 14: ok + Expect.equals(1, h.C?.staticF(() => 1)); /// 15: ok // The static type of o?.m(...) is the same as the static type of // o.m(...). - { int i = nullC()?.g(bad()); Expect.equals(null, i); } //# 03: ok - { int i = new C()?.g(() => 1); Expect.equals(1, i); } //# 04: ok - { String s = nullC()?.g(bad()); Expect.equals(null, s); } //# 05: static type warning - { String s = new C()?.g(() => null); Expect.equals(null, s); } //# 06: static type warning - { int i = C?.staticG(() => 1); Expect.equals(1, i); } //# 16: ok - { int i = h.C?.staticG(() => 1); Expect.equals(1, i); } //# 17: ok - { String s = C?.staticG(() => null); Expect.equals(null, s); } //# 18: static type warning - { String s = h.C?.staticG(() => null); Expect.equals(null, s); } //# 19: static type warning + { int i = nullC()?.g(bad()); Expect.equals(null, i); } /// 03: ok + { int i = new C()?.g(() => 1); Expect.equals(1, i); } /// 04: ok + { String s = nullC()?.g(bad()); Expect.equals(null, s); } /// 05: static type warning + { String s = new C()?.g(() => null); Expect.equals(null, s); } /// 06: static type warning + { int i = C?.staticG(() => 1); Expect.equals(1, i); } /// 16: ok + { int i = h.C?.staticG(() => 1); Expect.equals(1, i); } /// 17: ok + { String s = C?.staticG(() => null); Expect.equals(null, s); } /// 18: static type warning + { String s = h.C?.staticG(() => null); Expect.equals(null, s); } /// 19: static type warning // Let T be the static type of o and let y be a fresh variable of type T. // Exactly the same static warnings that would be caused by y.m(...) are also // generated in the case of o?.m(...). - { B b = new C(); Expect.equals(1, b?.f(() => 1)); } //# 07: static type warning - { int i = 1; Expect.equals(null, nullC()?.f(i)); } //# 08: static type warning + { B b = new C(); Expect.equals(1, b?.f(() => 1)); } /// 07: static type warning + { int i = 1; Expect.equals(null, nullC()?.f(i)); } /// 08: static type warning // '?.' can't be used to access toplevel functions in libraries imported via // prefix. - h?.topLevelFunction(); //# 11: compile-time error + h?.topLevelFunction(); /// 11: compile-time error // Nor can it be used to access the toString method on the class Type. - Expect.throws(() => C?.toString(), noMethod); //# 12: static type warning - Expect.throws(() => h.C?.toString(), noMethod); //# 13: static type warning + Expect.throws(() => C?.toString(), noMethod); /// 12: static type warning + Expect.throws(() => h.C?.toString(), noMethod); /// 13: static type warning } diff --git a/tests/language_strong/conditional_property_access_test.dart b/tests/language_strong/conditional_property_access_test.dart index d841a0cd4da..b5dfa85f432 100644 --- a/tests/language_strong/conditional_property_access_test.dart +++ b/tests/language_strong/conditional_property_access_test.dart @@ -26,32 +26,32 @@ main() { nullC()?.v; // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - Expect.equals(null, nullC()?.v); //# 01: ok - Expect.equals(1, new C(1)?.v); //# 02: ok + Expect.equals(null, nullC()?.v); /// 01: ok + Expect.equals(1, new C(1)?.v); /// 02: ok // C?.id is equivalent to C.id. - { C.staticInt = 1; Expect.equals(1, C?.staticInt); } //# 12: ok - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt); } //# 13: ok + { C.staticInt = 1; Expect.equals(1, C?.staticInt); } /// 12: ok + { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt); } /// 13: ok // The static type of e1?.d is the static type of e1.id. - { int i = new C(1)?.v; Expect.equals(1, i); } //# 03: ok - { String s = new C(null)?.v; Expect.equals(null, s); } //# 04: static type warning - { C.staticInt = 1; int i = C?.staticInt; Expect.equals(1, i); } //# 14: ok - { h.C.staticInt = 1; int i = h.C?.staticInt; Expect.equals(1, i); } //# 15: ok - { C.staticInt = null; String s = C?.staticInt; Expect.equals(null, s); } //# 16: static type warning - { h.C.staticInt = null; String s = h.C?.staticInt; Expect.equals(null, s); } //# 17: static type warning + { int i = new C(1)?.v; Expect.equals(1, i); } /// 03: ok + { String s = new C(null)?.v; Expect.equals(null, s); } /// 04: static type warning + { C.staticInt = 1; int i = C?.staticInt; Expect.equals(1, i); } /// 14: ok + { h.C.staticInt = 1; int i = h.C?.staticInt; Expect.equals(1, i); } /// 15: ok + { C.staticInt = null; String s = C?.staticInt; Expect.equals(null, s); } /// 16: static type warning + { h.C.staticInt = null; String s = h.C?.staticInt; Expect.equals(null, s); } /// 17: static type warning // Let T be the static type of e1 and let y be a fresh variable of type T. // Exactly the same static warnings that would be caused by y.id are also // generated in the case of e1?.id. - Expect.equals(null, nullC()?.bad); //# 05: static type warning - { B b = new C(1); Expect.equals(1, b?.v); } //# 06: static type warning + Expect.equals(null, nullC()?.bad); /// 05: static type warning + { B b = new C(1); Expect.equals(1, b?.v); } /// 06: static type warning // '?.' cannot be used to access toplevel properties in libraries imported via // prefix. - var x = h?.topLevelVar; //# 09: compile-time error + var x = h?.topLevelVar; /// 09: compile-time error // Nor can it be used to access the hashCode getter on the class Type. - Expect.throws(() => C?.hashCode, noMethod); //# 10: static type warning - Expect.throws(() => h.C?.hashCode, noMethod); //# 11: static type warning + Expect.throws(() => C?.hashCode, noMethod); /// 10: static type warning + Expect.throws(() => h.C?.hashCode, noMethod); /// 11: static type warning } diff --git a/tests/language_strong/conditional_property_assignment_test.dart b/tests/language_strong/conditional_property_assignment_test.dart index b27b9419319..12071984647 100644 --- a/tests/language_strong/conditional_property_assignment_test.dart +++ b/tests/language_strong/conditional_property_assignment_test.dart @@ -48,53 +48,53 @@ main() { nullC()?.v = 1; // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - Expect.equals(null, nullC()?.v = bad()); //# 01: ok - { C c = new C(1); Expect.equals(2, c?.v = 2); Expect.equals(2, c.v); } //# 02: ok + Expect.equals(null, nullC()?.v = bad()); /// 01: ok + { C c = new C(1); Expect.equals(2, c?.v = 2); Expect.equals(2, c.v); } /// 02: ok // C?.v = e2 is equivalent to C.v = e2. - { C.staticInt = 1; Expect.equals(2, C?.staticInt = 2); Expect.equals(2, C.staticInt); } //# 23: ok - { h.C.staticInt = 1; Expect.equals(2, h.C?.staticInt = 2); Expect.equals(2, h.C.staticInt); } //# 24: ok + { C.staticInt = 1; Expect.equals(2, C?.staticInt = 2); Expect.equals(2, C.staticInt); } /// 23: ok + { h.C.staticInt = 1; Expect.equals(2, h.C?.staticInt = 2); Expect.equals(2, h.C.staticInt); } /// 24: ok // The static type of e1?.v = e2 is the static type of e2. - { D d = new D(new E()); G g = new G(); F f = (d?.v = g); Expect.identical(f, g); } //# 03: ok - { D d = new D(new E()); E e = new G(); F f = (d?.v = e); Expect.identical(f, e); } //# 04: static type warning - { D.staticE = new E(); G g = new G(); F f = (D?.staticE = g); Expect.identical(f, g); } //# 25: ok - { h.D.staticE = new h.E(); h.G g = new h.G(); h.F f = (h.D?.staticE = g); Expect.identical(f, g); } //# 26: ok - { D.staticE = new E(); E e = new G(); F f = (D?.staticE = e); Expect.identical(f, e); } //# 27: static type warning - { h.D.staticE = new h.E(); h.E e = new h.G(); h.F f = (h.D?.staticE = e); Expect.identical(f, e); } //# 28: static type warning + { D d = new D(new E()); G g = new G(); F f = (d?.v = g); Expect.identical(f, g); } /// 03: ok + { D d = new D(new E()); E e = new G(); F f = (d?.v = e); Expect.identical(f, e); } /// 04: static type warning + { D.staticE = new E(); G g = new G(); F f = (D?.staticE = g); Expect.identical(f, g); } /// 25: ok + { h.D.staticE = new h.E(); h.G g = new h.G(); h.F f = (h.D?.staticE = g); Expect.identical(f, g); } /// 26: ok + { D.staticE = new E(); E e = new G(); F f = (D?.staticE = e); Expect.identical(f, e); } /// 27: static type warning + { h.D.staticE = new h.E(); h.E e = new h.G(); h.F f = (h.D?.staticE = e); Expect.identical(f, e); } /// 28: static type warning // Exactly the same static warnings that would be caused by e1.v = e2 are // also generated in the case of e1?.v = e2. - Expect.equals(null, nullC()?.bad = bad()); //# 05: static type warning - { B b = new C(1); Expect.equals(2, b?.v = 2); Expect.equals(2, (b as C).v); } //# 06: static type warning + Expect.equals(null, nullC()?.bad = bad()); /// 05: static type warning + { B b = new C(1); Expect.equals(2, b?.v = 2); Expect.equals(2, (b as C).v); } /// 06: static type warning // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - Expect.equals(null, nullC()?.v += bad()); //# 07: ok - { C c = new C(1); Expect.equals(3, c?.v += 2); Expect.equals(3, c.v); } //# 08: ok + Expect.equals(null, nullC()?.v += bad()); /// 07: ok + { C c = new C(1); Expect.equals(3, c?.v += 2); Expect.equals(3, c.v); } /// 08: ok // C?.v op= e2 is equivalent to C.v op= e2. - { C.staticInt = 1; Expect.equals(3, C?.staticInt += 2); Expect.equals(3, C?.staticInt); } //# 29: ok + { C.staticInt = 1; Expect.equals(3, C?.staticInt += 2); Expect.equals(3, C?.staticInt); } /// 29: ok // The static type of e1?.v op= e2 is the static type of e1.v op e2. - { D d = new D(new E()); F f = (d?.v += 1); Expect.identical(d.v, f); } //# 09: ok - { D.staticE = new E(); F f = (D?.staticE += 1); Expect.identical(D.staticE, f); } //# 30: ok - { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += 1); Expect.identical(h.D.staticE, f); } //# 31: ok + { D d = new D(new E()); F f = (d?.v += 1); Expect.identical(d.v, f); } /// 09: ok + { D.staticE = new E(); F f = (D?.staticE += 1); Expect.identical(D.staticE, f); } /// 30: ok + { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += 1); Expect.identical(h.D.staticE, f); } /// 31: ok // Let T be the static type of e1 and let y be a fresh variable of type T. // Exactly the same static warnings that would be caused by y.v op e2 are // also generated in the case of e1?.v op= e2. - Expect.equals(null, nullC()?.bad = bad()); //# 10: static type warning - { B b = new C(1); Expect.equals(3, b?.v += 2); Expect.equals(3, (b as C).v); } //# 11: static type warning - { D d = new D(new E()); F f = (d?.v += nullC()); Expect.identical(d.v, f); } //# 12: static type warning - { D d = new D(new E()); H h = (d?.v += 1); Expect.identical(d.v, h); } //# 13: static type warning - { D.staticE = new E(); F f = (D?.staticE += nullC()); Expect.identical(D.staticE, f); } //# 32: static type warning - { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += h.nullC()); Expect.identical(h.D.staticE, f); } //# 33: static type warning - { D.staticE = new E(); H h = (D?.staticE += 1); Expect.identical(D.staticE, h); } //# 34: static type warning - { h.D.staticE = new h.E(); h.H hh = (h.D?.staticE += 1); Expect.identical(h.D.staticE, hh); } //# 35: static type warning + Expect.equals(null, nullC()?.bad = bad()); /// 10: static type warning + { B b = new C(1); Expect.equals(3, b?.v += 2); Expect.equals(3, (b as C).v); } /// 11: static type warning + { D d = new D(new E()); F f = (d?.v += nullC()); Expect.identical(d.v, f); } /// 12: static type warning + { D d = new D(new E()); H h = (d?.v += 1); Expect.identical(d.v, h); } /// 13: static type warning + { D.staticE = new E(); F f = (D?.staticE += nullC()); Expect.identical(D.staticE, f); } /// 32: static type warning + { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += h.nullC()); Expect.identical(h.D.staticE, f); } /// 33: static type warning + { D.staticE = new E(); H h = (D?.staticE += 1); Expect.identical(D.staticE, h); } /// 34: static type warning + { h.D.staticE = new h.E(); h.H hh = (h.D?.staticE += 1); Expect.identical(h.D.staticE, hh); } /// 35: static type warning // '?.' cannot be used to assign to toplevel properties in libraries imported // via prefix. - h?.topLevelVar = null; //# 20: compile-time error - h?.topLevelVar += null; //# 21: compile-time error - h?.topLevelVar ??= null; //# 22: compile-time error + h?.topLevelVar = null; /// 20: compile-time error + h?.topLevelVar += null; /// 21: compile-time error + h?.topLevelVar ??= null; /// 22: compile-time error } diff --git a/tests/language_strong/conditional_property_increment_decrement_test.dart b/tests/language_strong/conditional_property_increment_decrement_test.dart index 4f0e587a9b0..81a27c65b5a 100644 --- a/tests/language_strong/conditional_property_increment_decrement_test.dart +++ b/tests/language_strong/conditional_property_increment_decrement_test.dart @@ -41,66 +41,66 @@ main() { nullC()?.v = 1; // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - Expect.equals(null, nullC()?.v++); //# 01: ok - { C c = new C(1); Expect.equals(1, c?.v++); Expect.equals(2, c.v); } //# 02: ok + Expect.equals(null, nullC()?.v++); /// 01: ok + { C c = new C(1); Expect.equals(1, c?.v++); Expect.equals(2, c.v); } /// 02: ok // C?.v++ is equivalent to C.v++. - { C.staticInt = 1; Expect.equals(1, C?.staticInt++); Expect.equals(2, C.staticInt); } //# 17: ok - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt++); Expect.equals(2, h.C.staticInt); } //# 18: ok + { C.staticInt = 1; Expect.equals(1, C?.staticInt++); Expect.equals(2, C.staticInt); } /// 17: ok + { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt++); Expect.equals(2, h.C.staticInt); } /// 18: ok // The static type of e1?.v++ is the same as the static type of e1.v. - { E e1 = new E(); D d = new D(e1); E e2 = d?.v++; Expect.identical(e1, e2); } //# 03: ok - { G g = new G(); D d = new D(g); F f = d?.v++; Expect.identical(f, g); } //# 04: static type warning - { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE++; Expect.identical(e1, e2); } //# 19: ok - { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE++; Expect.identical(e1, e2); } //# 20: ok - { G g = new G(); D.staticE = g; F f = D?.staticE++; Expect.identical(f, g); } //# 21: static type warning - { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE++; Expect.identical(f, g); } //# 22: static type warning + { E e1 = new E(); D d = new D(e1); E e2 = d?.v++; Expect.identical(e1, e2); } /// 03: ok + { G g = new G(); D d = new D(g); F f = d?.v++; Expect.identical(f, g); } /// 04: static type warning + { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE++; Expect.identical(e1, e2); } /// 19: ok + { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE++; Expect.identical(e1, e2); } /// 20: ok + { G g = new G(); D.staticE = g; F f = D?.staticE++; Expect.identical(f, g); } /// 21: static type warning + { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE++; Expect.identical(f, g); } /// 22: static type warning // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - Expect.equals(null, nullC()?.v--); //# 05: ok - { C c = new C(1); Expect.equals(1, c?.v--); Expect.equals(0, c.v); } //# 06: ok + Expect.equals(null, nullC()?.v--); /// 05: ok + { C c = new C(1); Expect.equals(1, c?.v--); Expect.equals(0, c.v); } /// 06: ok // C?.v-- is equivalent to C.v--. - { C.staticInt = 1; Expect.equals(1, C?.staticInt--); Expect.equals(0, C.staticInt); } //# 23: ok - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt--); Expect.equals(0, h.C.staticInt); } //# 24: ok + { C.staticInt = 1; Expect.equals(1, C?.staticInt--); Expect.equals(0, C.staticInt); } /// 23: ok + { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt--); Expect.equals(0, h.C.staticInt); } /// 24: ok // The static type of e1?.v-- is the same as the static type of e1.v. - { E e1 = new E(); D d = new D(e1); E e2 = d?.v--; Expect.identical(e1, e2); } //# 07: ok - { G g = new G(); D d = new D(g); F f = d?.v--; Expect.identical(f, g); } //# 08: static type warning - { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE--; Expect.identical(e1, e2); } //# 25: ok - { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE--; Expect.identical(e1, e2); } //# 26: ok - { G g = new G(); D.staticE = g; F f = D?.staticE--; Expect.identical(f, g); } //# 27: static type warning - { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE--; Expect.identical(f, g); } //# 28: static type warning + { E e1 = new E(); D d = new D(e1); E e2 = d?.v--; Expect.identical(e1, e2); } /// 07: ok + { G g = new G(); D d = new D(g); F f = d?.v--; Expect.identical(f, g); } /// 08: static type warning + { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE--; Expect.identical(e1, e2); } /// 25: ok + { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE--; Expect.identical(e1, e2); } /// 26: ok + { G g = new G(); D.staticE = g; F f = D?.staticE--; Expect.identical(f, g); } /// 27: static type warning + { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE--; Expect.identical(f, g); } /// 28: static type warning // ++e1?.v is equivalent to e1?.v += 1. - Expect.equals(null, ++nullC()?.v); //# 09: ok - { C c = new C(1); Expect.equals(2, ++c?.v); Expect.equals(2, c.v); } //# 10: ok + Expect.equals(null, ++nullC()?.v); /// 09: ok + { C c = new C(1); Expect.equals(2, ++c?.v); Expect.equals(2, c.v); } /// 10: ok // ++C?.v is equivalent to C?.v += 1. - { C.staticInt = 1; Expect.equals(2, ++C?.staticInt); Expect.equals(2, C.staticInt); } //# 29: ok - { h.C.staticInt = 1; Expect.equals(2, ++h.C?.staticInt); Expect.equals(2, h.C.staticInt); } //# 30: ok + { C.staticInt = 1; Expect.equals(2, ++C?.staticInt); Expect.equals(2, C.staticInt); } /// 29: ok + { h.C.staticInt = 1; Expect.equals(2, ++h.C?.staticInt); Expect.equals(2, h.C.staticInt); } /// 30: ok // The static type of ++e1?.v is the same as the static type of e1.v + 1. - { D d = new D(new E()); F f = ++d?.v; Expect.identical(d.v, f); } //# 11: ok - { D d = new D(new E()); H h = ++d?.v; Expect.identical(d.v, h); } //# 12: static type warning - { D.staticE = new E(); F f = ++D?.staticE; Expect.identical(D.staticE, f); } //# 31: ok - { h.D.staticE = new h.E(); h.F f = ++h.D?.staticE; Expect.identical(h.D.staticE, f); } //# 32: ok - { D.staticE = new E(); H h = ++D?.staticE; Expect.identical(D.staticE, h); } //# 33: static type warning - { h.D.staticE = new h.E(); h.H hh = ++h.D?.staticE; Expect.identical(h.D.staticE, hh); } //# 34: static type warning + { D d = new D(new E()); F f = ++d?.v; Expect.identical(d.v, f); } /// 11: ok + { D d = new D(new E()); H h = ++d?.v; Expect.identical(d.v, h); } /// 12: static type warning + { D.staticE = new E(); F f = ++D?.staticE; Expect.identical(D.staticE, f); } /// 31: ok + { h.D.staticE = new h.E(); h.F f = ++h.D?.staticE; Expect.identical(h.D.staticE, f); } /// 32: ok + { D.staticE = new E(); H h = ++D?.staticE; Expect.identical(D.staticE, h); } /// 33: static type warning + { h.D.staticE = new h.E(); h.H hh = ++h.D?.staticE; Expect.identical(h.D.staticE, hh); } /// 34: static type warning // --e1?.v is equivalent to e1?.v -= 1. - Expect.equals(null, --nullC()?.v); //# 13: ok - { C c = new C(1); Expect.equals(0, --c?.v); Expect.equals(0, c.v); } //# 14: ok + Expect.equals(null, --nullC()?.v); /// 13: ok + { C c = new C(1); Expect.equals(0, --c?.v); Expect.equals(0, c.v); } /// 14: ok // --C?.v is equivalent to C?.v -= 1. - { C.staticInt = 1; Expect.equals(0, --C?.staticInt); Expect.equals(0, C.staticInt); } //# 35: ok - { h.C.staticInt = 1; Expect.equals(0, --h.C?.staticInt); Expect.equals(0, h.C.staticInt); } //# 36: ok + { C.staticInt = 1; Expect.equals(0, --C?.staticInt); Expect.equals(0, C.staticInt); } /// 35: ok + { h.C.staticInt = 1; Expect.equals(0, --h.C?.staticInt); Expect.equals(0, h.C.staticInt); } /// 36: ok // The static type of --e1?.v is the same as the static type of e1.v - 1. - { D d = new D(new E()); F f = --d?.v; Expect.identical(d.v, f); } //# 15: ok - { D d = new D(new E()); H h = --d?.v; Expect.identical(d.v, h); } //# 16: static type warning - { D.staticE = new E(); F f = --D?.staticE; Expect.identical(D.staticE, f); } //# 37: ok - { h.D.staticE = new h.E(); h.F f = --h.D?.staticE; Expect.identical(h.D.staticE, f); } //# 38: ok - { D.staticE = new E(); H h = --D?.staticE; Expect.identical(D.staticE, h); } //# 39: static type warning - { h.D.staticE = new h.E(); h.H hh = --h.D?.staticE; Expect.identical(h.D.staticE, hh); } //# 40: static type warning + { D d = new D(new E()); F f = --d?.v; Expect.identical(d.v, f); } /// 15: ok + { D d = new D(new E()); H h = --d?.v; Expect.identical(d.v, h); } /// 16: static type warning + { D.staticE = new E(); F f = --D?.staticE; Expect.identical(D.staticE, f); } /// 37: ok + { h.D.staticE = new h.E(); h.F f = --h.D?.staticE; Expect.identical(h.D.staticE, f); } /// 38: ok + { D.staticE = new E(); H h = --D?.staticE; Expect.identical(D.staticE, h); } /// 39: static type warning + { h.D.staticE = new h.E(); h.H hh = --h.D?.staticE; Expect.identical(h.D.staticE, hh); } /// 40: static type warning } diff --git a/tests/language_strong/const_conditional_test.dart b/tests/language_strong/const_conditional_test.dart index bae4396a66d..f2ed35d6b53 100644 --- a/tests/language_strong/const_conditional_test.dart +++ b/tests/language_strong/const_conditional_test.dart @@ -22,35 +22,35 @@ var nonConst = true; const zeroConst = 0; const cond1 = trueConst ? const0 : const1; -const cond1a = trueConst ? nonConst : const1; //# 01: compile-time error -const cond1b = trueConst ? const0 : nonConst; //# 02: compile-time error +const cond1a = trueConst ? nonConst : const1; /// 01: compile-time error +const cond1b = trueConst ? const0 : nonConst; /// 02: compile-time error const cond2 = falseConst ? const0 : const1; -const cond2a = falseConst ? nonConst : const1; //# 03: compile-time error -const cond2b = falseConst ? const0 : nonConst; //# 04: compile-time error +const cond2a = falseConst ? nonConst : const1; /// 03: compile-time error +const cond2b = falseConst ? const0 : nonConst; /// 04: compile-time error -const cond3 = nonConst ? const0 : const1; //# 05: compile-time error -const cond3a = nonConst ? nonConst : const1; //# 06: compile-time error -const cond3b = nonConst ? const0 : nonConst; //# 07: compile-time error +const cond3 = nonConst ? const0 : const1; /// 05: compile-time error +const cond3a = nonConst ? nonConst : const1; /// 06: compile-time error +const cond3b = nonConst ? const0 : nonConst; /// 07: compile-time error -const cond4 = zeroConst ? const0 : const1; //# 08: compile-time error -const cond4a = zeroConst ? nonConst : const1; //# 09: compile-time error -const cond4b = zeroConst ? const0 : nonConst; //# 10: compile-time error +const cond4 = zeroConst ? const0 : const1; /// 08: compile-time error +const cond4a = zeroConst ? nonConst : const1; /// 09: compile-time error +const cond4b = zeroConst ? const0 : nonConst; /// 10: compile-time error void main() { Expect.identical(var0, cond1); - Expect.identical(nonConst, cond1a); //# 01: continued - Expect.identical(var0, cond1b); //# 02: continued + Expect.identical(nonConst, cond1a); /// 01: continued + Expect.identical(var0, cond1b); /// 02: continued Expect.identical(var1, cond2); - Expect.identical(var1, cond2a); //# 03: continued - Expect.identical(nonConst, cond2b); //# 04: continued + Expect.identical(var1, cond2a); /// 03: continued + Expect.identical(nonConst, cond2b); /// 04: continued - Expect.identical(var0, cond3); // //# 05: continued - Expect.identical(nonConst, cond3a); //# 06: continued - Expect.identical(var0, cond3b); //# 07: continued + Expect.identical(var0, cond3); // /// 05: continued + Expect.identical(nonConst, cond3a); /// 06: continued + Expect.identical(var0, cond3b); /// 07: continued - Expect.identical(var1, cond4); // //# 08: continued - Expect.identical(var1, cond4a); //# 09: continued - Expect.identical(nonConst, cond4b); //# 10: continued + Expect.identical(var1, cond4); // /// 08: continued + Expect.identical(var1, cond4a); /// 09: continued + Expect.identical(nonConst, cond4b); /// 10: continued } \ No newline at end of file diff --git a/tests/language_strong/const_constructor2_test.dart b/tests/language_strong/const_constructor2_test.dart index fe42eaf7c4e..13358891dcc 100644 --- a/tests/language_strong/const_constructor2_test.dart +++ b/tests/language_strong/const_constructor2_test.dart @@ -48,31 +48,31 @@ class G implements F { main() { const A a = const B(); - const C c1 = const C(a); //# 01: ok - const C c2 = const C.optional(a); //# 02: ok - const C c3 = const C.named(a: a); //# 03: ok - const C c4 = const C.untyped(a); //# 04: ok - const C c5 = const C.subtyped(a); //# 05: ok - const C c5m = const C.redirecting(a); //# 06: ok + const C c1 = const C(a); /// 01: ok + const C c2 = const C.optional(a); /// 02: ok + const C c3 = const C.named(a: a); /// 03: ok + const C c4 = const C.untyped(a); /// 04: ok + const C c5 = const C.subtyped(a); /// 05: ok + const C c5m = const C.redirecting(a); /// 06: ok - const C c6 = const C(a); //# 07: ok - const C c7 = const C.optional(a); //# 08: ok - const C c8 = const C.named(a: a); //# 09: ok - const C c9 = const C.untyped(a); //# 10: ok - const C c10 = const C.subtyped(a); //# 11: ok - const C c10m = const C.redirecting(a); //# 12: ok + const C c6 = const C(a); /// 07: ok + const C c7 = const C.optional(a); /// 08: ok + const C c8 = const C.named(a: a); /// 09: ok + const C c9 = const C.untyped(a); /// 10: ok + const C c10 = const C.subtyped(a); /// 11: ok + const C c10m = const C.redirecting(a); /// 12: ok - const C c11 = const C(a); //# 13: static type warning, checked mode compile-time error - const C c12 = const C.optional(a); //# 14: static type warning, checked mode compile-time error - const C c13 = const C.named(a: a); //# 15: static type warning, checked mode compile-time error - const C c14 = const C.untyped(a); //# 16: static type warning, checked mode compile-time error - const C c15 = const C.subtyped(a); //# 17: static type warning, checked mode compile-time error - const C c15m = const C.redirecting(a); //# 18: static type warning + const C c11 = const C(a); /// 13: static type warning, checked mode compile-time error + const C c12 = const C.optional(a); /// 14: static type warning, checked mode compile-time error + const C c13 = const C.named(a: a); /// 15: static type warning, checked mode compile-time error + const C c14 = const C.untyped(a); /// 16: static type warning, checked mode compile-time error + const C c15 = const C.subtyped(a); /// 17: static type warning, checked mode compile-time error + const C c15m = const C.redirecting(a); /// 18: static type warning - const E e1 = const E.redirecting1(0); //# 19: ok - const E e2 = const E.redirecting1(''); //# 20: checked mode compile-time error - const E e3 = const E.redirecting2(0); //# 21: ok - const E e4 = const E.redirecting2(''); //# 22: checked mode compile-time error - const E e5 = const E.redirecting3(0); //# 23: ok - const E e6 = const E.redirecting3(''); //# 24: checked mode compile-time error + const E e1 = const E.redirecting1(0); /// 19: ok + const E e2 = const E.redirecting1(''); /// 20: checked mode compile-time error + const E e3 = const E.redirecting2(0); /// 21: ok + const E e4 = const E.redirecting2(''); /// 22: checked mode compile-time error + const E e5 = const E.redirecting3(0); /// 23: ok + const E e6 = const E.redirecting3(''); /// 24: checked mode compile-time error } \ No newline at end of file diff --git a/tests/language_strong/const_constructor3_test.dart b/tests/language_strong/const_constructor3_test.dart index 0a13ca70e89..2f1353aa27f 100644 --- a/tests/language_strong/const_constructor3_test.dart +++ b/tests/language_strong/const_constructor3_test.dart @@ -11,14 +11,14 @@ class D extends C { const D(var d) : super(d); } -const c = const C(0.0); //# 01: ok -const d = const C(0); //# 02: static type warning, checked mode compile-time error -const e = const D(0.0); //# 03: ok -const f = const D(0); //# 04: checked mode compile-time error +const c = const C(0.0); /// 01: ok +const d = const C(0); /// 02: static type warning, checked mode compile-time error +const e = const D(0.0); /// 03: ok +const f = const D(0); /// 04: checked mode compile-time error main() { - print(c); //# 01: continued - print(d); //# 02: continued - print(e); //# 03: continued - print(f); //# 04: continued + print(c); /// 01: continued + print(d); /// 02: continued + print(e); /// 03: continued + print(f); /// 04: continued } \ No newline at end of file diff --git a/tests/language_strong/const_constructor_mixin2_test.dart b/tests/language_strong/const_constructor_mixin2_test.dart index f323b5a33b9..558014bf07e 100644 --- a/tests/language_strong/const_constructor_mixin2_test.dart +++ b/tests/language_strong/const_constructor_mixin2_test.dart @@ -11,12 +11,12 @@ class A { } class B extends A - with Mixin // //# 01: compile-time error + with Mixin // /// 01: compile-time error { const B(foo) : super(foo); } main() { var a = const B(42); - a.nonFinalField = 54; //# 01: continued + a.nonFinalField = 54; /// 01: continued } diff --git a/tests/language_strong/const_constructor_mixin3_test.dart b/tests/language_strong/const_constructor_mixin3_test.dart index 0e46fe3c034..c81b7d3ecf6 100644 --- a/tests/language_strong/const_constructor_mixin3_test.dart +++ b/tests/language_strong/const_constructor_mixin3_test.dart @@ -10,7 +10,7 @@ class A { } class B extends A - with Mixin //# 01: compile-time error + with Mixin /// 01: compile-time error { const B(); } diff --git a/tests/language_strong/const_constructor_mixin_test.dart b/tests/language_strong/const_constructor_mixin_test.dart index 29664b5a328..135828202ab 100644 --- a/tests/language_strong/const_constructor_mixin_test.dart +++ b/tests/language_strong/const_constructor_mixin_test.dart @@ -10,7 +10,7 @@ class A { } class B extends A - with Mixin // //# 01: compile-time error + with Mixin // /// 01: compile-time error { const B(foo) : super(foo); } diff --git a/tests/language_strong/const_constructor_nonconst_field_test.dart b/tests/language_strong/const_constructor_nonconst_field_test.dart index 6dab9fd1389..9571a408a13 100644 --- a/tests/language_strong/const_constructor_nonconst_field_test.dart +++ b/tests/language_strong/const_constructor_nonconst_field_test.dart @@ -5,7 +5,7 @@ import "package:expect/expect.dart"; class A { - final int i = f(); //# 01: compile-time error + final int i = f(); /// 01: compile-time error final int j = 1; const A(); } diff --git a/tests/language_strong/const_constructor_super_test.dart b/tests/language_strong/const_constructor_super_test.dart index 2b5adb30418..faf0418ba07 100644 --- a/tests/language_strong/const_constructor_super_test.dart +++ b/tests/language_strong/const_constructor_super_test.dart @@ -15,17 +15,17 @@ class B extends A { B(x) : b = x + 1, super(x); // Const constructor cannot call non-const super constructor. - const B.zerofive() : b = 0, super(5); // //# 01: compile-time error + const B.zerofive() : b = 0, super(5); // /// 01: compile-time error } class C extends A { C() : super(0); // Implicit call to non-const constructor A(x). - const C.named(x); // //# 02: compile-time error + const C.named(x); // /// 02: compile-time error } main() { - var b = new B.zerofive(); // //# 01: continued + var b = new B.zerofive(); // /// 01: continued var b1 = new B(0); - var c = new C.named(""); // //# 02: continued + var c = new C.named(""); // /// 02: continued } diff --git a/tests/language_strong/const_constructor_syntax_test.dart b/tests/language_strong/const_constructor_syntax_test.dart index f4ae9aac32b..4dabdeec47b 100644 --- a/tests/language_strong/const_constructor_syntax_test.dart +++ b/tests/language_strong/const_constructor_syntax_test.dart @@ -3,10 +3,10 @@ // BSD-style license that can be found in the LICENSE file. main() { - var c0 = const C0(); //# 01: compile-time error - var i0 = const I0(); //# 02: compile-time error + var c0 = const C0(); /// 01: compile-time error + var i0 = const I0(); /// 02: compile-time error var c1 = const C1(); - var c2 = const C2(); //# 03: compile-time error + var c2 = const C2(); /// 03: compile-time error var c3 = const C3(); } @@ -20,7 +20,7 @@ class C0 implements I0 { class C1 { const C1(); - var modifiable; //# 04: compile-time error + var modifiable; /// 04: compile-time error } class C2 { @@ -29,7 +29,7 @@ class C2 { class C3 { const C3() - : field = new C0() //# 05: compile-time error + : field = new C0() /// 05: compile-time error ; final field = null; } diff --git a/tests/language_strong/const_constructor_test.dart b/tests/language_strong/const_constructor_test.dart index ae84d733d70..94dbaee311a 100644 --- a/tests/language_strong/const_constructor_test.dart +++ b/tests/language_strong/const_constructor_test.dart @@ -13,5 +13,5 @@ class A { main() { Expect.equals(42, (const A.named()).x); Expect.equals(42, (new A.named()).x); - const A(); //# 01: compile-time error + const A(); /// 01: compile-time error } diff --git a/tests/language_strong/const_dynamic_type_literal_test.dart b/tests/language_strong/const_dynamic_type_literal_test.dart index e35eea2164f..a1be0f34420 100644 --- a/tests/language_strong/const_dynamic_type_literal_test.dart +++ b/tests/language_strong/const_dynamic_type_literal_test.dart @@ -11,7 +11,7 @@ const d = dynamic; const i = int; void main() { - Expect.isTrue(identical(d, dynamic)); //# 01: ok - Expect.equals(1, const { d: 1, d: 2 }.length); //# 02: static type warning - Expect.equals(2, const { d: 1, i: 2 }.length); //# 03: ok + Expect.isTrue(identical(d, dynamic)); /// 01: ok + Expect.equals(1, const { d: 1, d: 2 }.length); /// 02: static type warning + Expect.equals(2, const { d: 1, i: 2 }.length); /// 03: ok } diff --git a/tests/language_strong/const_error_multiply_initialized_test.dart b/tests/language_strong/const_error_multiply_initialized_test.dart index 104bed70c61..896b1a31453 100644 --- a/tests/language_strong/const_error_multiply_initialized_test.dart +++ b/tests/language_strong/const_error_multiply_initialized_test.dart @@ -14,15 +14,15 @@ import "package:expect/expect.dart"; class C { final x = 1; - const C() : x = 2; //# 01: compile-time error - const C() : x = 2; //# 02: static type warning - const C(this.x); //# 03: compile-time error - const C(this.x); //# 04: static type warning + const C() : x = 2; /// 01: compile-time error + const C() : x = 2; /// 02: static type warning + const C(this.x); /// 03: compile-time error + const C(this.x); /// 04: static type warning } main() { - const C(); //# 01: continued - Expect.throws(() => new C()); //# 02: continued - const C(2); //# 03: continued - Expect.throws(() => new C(2)); //# 04: continued + const C(); /// 01: continued + Expect.throws(() => new C()); /// 02: continued + const C(2); /// 03: continued + Expect.throws(() => new C(2)); /// 04: continued } diff --git a/tests/language_strong/const_evaluation_test.dart b/tests/language_strong/const_evaluation_test.dart index fafbb213217..acfb66aef30 100644 --- a/tests/language_strong/const_evaluation_test.dart +++ b/tests/language_strong/const_evaluation_test.dart @@ -38,9 +38,9 @@ class C { Expect.equals(instance_var, local_const); Expect.equals(local_const, local_final); Expect.equals(local_final, local_var); - var metadata = reflectClass(C).metadata[0].reflectee; //# 01: ok - Expect.equals(top_const, metadata); // //# 01: continued - Expect.equals(local_var, metadata); // //# 01: continued + var metadata = reflectClass(C).metadata[0].reflectee; /// 01: ok + Expect.equals(top_const, metadata); // /// 01: continued + Expect.equals(local_var, metadata); // /// 01: continued } } diff --git a/tests/language_strong/const_factory_with_body_test.dart b/tests/language_strong/const_factory_with_body_test.dart index 1c6a74e1257..dea62482ad5 100644 --- a/tests/language_strong/const_factory_with_body_test.dart +++ b/tests/language_strong/const_factory_with_body_test.dart @@ -5,9 +5,9 @@ // Tests that a "const factory" with body produces a compile-time error. class ConstFactoryWithBody { - const factory ConstFactoryWithBody.one() { } // //# 01: compile-time error + const factory ConstFactoryWithBody.one() { } // /// 01: compile-time error } main() { - const ConstFactoryWithBody.one(); // //# 01: continued + const ConstFactoryWithBody.one(); // /// 01: continued } diff --git a/tests/language_strong/const_init2_test.dart b/tests/language_strong/const_init2_test.dart index fa68e4a7431..e6e1c4eb985 100644 --- a/tests/language_strong/const_init2_test.dart +++ b/tests/language_strong/const_init2_test.dart @@ -2,10 +2,10 @@ // 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. -const double c = 0.0; //# 01: ok -const double d = 0; //# 02: static type warning, checked mode compile-time error +const double c = 0.0; /// 01: ok +const double d = 0; /// 02: static type warning, checked mode compile-time error main() { - print(c); //# 01: continued - print(d); //# 02: continued + print(c); /// 01: continued + print(d); /// 02: continued } \ No newline at end of file diff --git a/tests/language_strong/const_instance_field_test.dart b/tests/language_strong/const_instance_field_test.dart index 6fc24937b99..5724c170474 100644 --- a/tests/language_strong/const_instance_field_test.dart +++ b/tests/language_strong/const_instance_field_test.dart @@ -5,7 +5,7 @@ // Test that const instance fields are compile-time errors. class C { - const field = 0; //# 01: compile-time error + const field = 0; /// 01: compile-time error } void main() { diff --git a/tests/language_strong/const_map2_test.dart b/tests/language_strong/const_map2_test.dart index e4bb56d6d1f..4724b114d02 100644 --- a/tests/language_strong/const_map2_test.dart +++ b/tests/language_strong/const_map2_test.dart @@ -11,7 +11,7 @@ class A { class B implements A { const B(); - operator ==(o) => true; // //# 00: compile-time error + operator ==(o) => true; // /// 00: compile-time error } confuse(x) { diff --git a/tests/language_strong/const_map3_test.dart b/tests/language_strong/const_map3_test.dart index df3f5d08b9e..e0d27fe7af7 100644 --- a/tests/language_strong/const_map3_test.dart +++ b/tests/language_strong/const_map3_test.dart @@ -11,7 +11,7 @@ class A { class B implements A { const B(); - operator ==(o) => true; // //# 00: compile-time error + operator ==(o) => true; // /// 00: compile-time error } main() { diff --git a/tests/language_strong/const_native_factory_test.dart b/tests/language_strong/const_native_factory_test.dart index a33d48762fa..e6592a4e382 100644 --- a/tests/language_strong/const_native_factory_test.dart +++ b/tests/language_strong/const_native_factory_test.dart @@ -5,7 +5,7 @@ class Cake { final name; const Cake(this.name); - const factory BakeMeACake() native "Cake_BakeMeACake"; // //# 01: compile-time error + const factory BakeMeACake() native "Cake_BakeMeACake"; // /// 01: compile-time error } main() { diff --git a/tests/language_strong/const_objects_are_immutable_test.dart b/tests/language_strong/const_objects_are_immutable_test.dart index 8028818d2af..eb32b400e68 100644 --- a/tests/language_strong/const_objects_are_immutable_test.dart +++ b/tests/language_strong/const_objects_are_immutable_test.dart @@ -24,6 +24,6 @@ main() { Expect.equals(1, a1.x); A a2 = const A(1, 2); - Expect.throws(() => a2.x = 499); //# 01: static type warning + Expect.throws(() => a2.x = 499); /// 01: static type warning Expect.equals(1, a2.x); } diff --git a/tests/language_strong/const_switch2_test.dart b/tests/language_strong/const_switch2_test.dart index 77638c0a784..9262bbefa71 100644 --- a/tests/language_strong/const_switch2_test.dart +++ b/tests/language_strong/const_switch2_test.dart @@ -7,8 +7,8 @@ import 'package:expect/expect.dart'; int main() { var a = [1,2,3][2]; switch (a) { - case 0.0: // //# 01: compile-time error - print("illegal"); // //# 01: continued + case 0.0: // /// 01: compile-time error + print("illegal"); // /// 01: continued case 1: print("OK"); } diff --git a/tests/language_strong/const_switch_test.dart b/tests/language_strong/const_switch_test.dart index 801288b5d4b..94be12c0cdd 100644 --- a/tests/language_strong/const_switch_test.dart +++ b/tests/language_strong/const_switch_test.dart @@ -15,10 +15,10 @@ const c3 = const C(0.5 + 0.5); const c4 = const C(1); main() { - Expect.equals('0.0', test(c1)); //# 01: ok - Expect.equals('0', test(c2)); // //# 02: ok - Expect.equals('1.0', test(c3)); //# 03: ok - Expect.equals('1', test(c4)); // //# 04: ok + Expect.equals('0.0', test(c1)); /// 01: ok + Expect.equals('0', test(c2)); // /// 02: ok + Expect.equals('1.0', test(c3)); /// 03: ok + Expect.equals('1', test(c4)); // /// 04: ok } String test(C c) { diff --git a/tests/language_strong/const_syntax_test.dart b/tests/language_strong/const_syntax_test.dart index 74c90cfb3d2..112741c85c8 100644 --- a/tests/language_strong/const_syntax_test.dart +++ b/tests/language_strong/const_syntax_test.dart @@ -6,45 +6,45 @@ import "package:expect/expect.dart"; main() { const f0 = 42; - const f1; //# 01: compile-time error + const f1; /// 01: compile-time error const int f2 = 87; - const int f3; //# 02: compile-time error + const int f3; /// 02: compile-time error Expect.equals(42, f0); Expect.equals(87, f2); Expect.equals(42, F0); - Expect.equals(null, F1); //# 03: compile-time error + Expect.equals(null, F1); /// 03: compile-time error Expect.equals(87, F2); - Expect.equals(null, F3); //# 04: compile-time error + Expect.equals(null, F3); /// 04: compile-time error Expect.isTrue(P0 is Point); - Expect.isTrue(P1 is int); // //# 05: compile-time error - Expect.isTrue(P2 is Point); //# 06: compile-time error - Expect.isTrue(P3 is int); // //# 07: compile-time error + Expect.isTrue(P1 is int); // /// 05: compile-time error + Expect.isTrue(P2 is Point); /// 06: compile-time error + Expect.isTrue(P3 is int); // /// 07: compile-time error Expect.isTrue(A0 is int); Expect.isTrue(A1 is int); - Expect.isTrue(A2 is int); //# 08: compile-time error - Expect.isTrue(A3 is int); //# 08: continued + Expect.isTrue(A2 is int); /// 08: compile-time error + Expect.isTrue(A3 is int); /// 08: continued Expect.isTrue(C0.X is C1); - Expect.isTrue(C0.X.x is C1); //# 09: compile-time error + Expect.isTrue(C0.X.x is C1); /// 09: compile-time error Expect.equals("Hello 42", B2); - Expect.equals("42Hello", B3); //# 10: compile-time error + Expect.equals("42Hello", B3); /// 10: compile-time error const cf1 = identical(const Point(1, 2), const Point(1, 2)); - const cf2 = identical(const Point(1, 2), new Point(1, 2)); // //# 11: compile-time error + const cf2 = identical(const Point(1, 2), new Point(1, 2)); // /// 11: compile-time error - var f4 = B4; // //# 12: compile-time error + var f4 = B4; // /// 12: compile-time error var f5 = B5; } const F0 = 42; -const F1; // //# 03: continued +const F1; // /// 03: continued const int F2 = 87; -const int F3; // //# 04: continued +const int F3; // /// 04: continued class Point { final x, y; @@ -55,16 +55,16 @@ class Point { // Check that compile time expressions can include invocations of // user-defined const constructors. const P0 = const Point(0, 0); -const P1 = const Point(0, 0) + 1; //# 05: continued -const P2 = new Point(0, 0); // //# 06: continued -const P3 = new Point(0, 0) + 1; // //# 07: continued +const P1 = const Point(0, 0) + 1; /// 05: continued +const P2 = new Point(0, 0); // /// 06: continued +const P3 = new Point(0, 0) + 1; // /// 07: continued // Check that we cannot have cyclic references in compile time // expressions. const A0 = 42; const A1 = A0 + 1; -const A2 = A3 + 1; //# 08: continued -const A3 = A2 + 1; //# 08: continued +const A2 = A3 + 1; /// 08: continued +const A3 = A2 + 1; /// 08: continued class C0 { static const X = const C1(); @@ -72,7 +72,7 @@ class C0 { class C1 { const C1() - : x = C0.X //# 09: continued + : x = C0.X /// 09: continued ; final x = null; } @@ -81,9 +81,9 @@ class C1 { const B0 = 42; const B1 = "Hello"; const B2 = "$B1 $B0"; -const B3 = B0 + B1; //# 10: continued +const B3 = B0 + B1; /// 10: continued // Check identical. -const B4 = identical(1, new Point(1,2)); // //# 12: compile-time error +const B4 = identical(1, new Point(1,2)); // /// 12: compile-time error const B5 = identical(1, const Point(1,2)); diff --git a/tests/language_strong/const_types_test.dart b/tests/language_strong/const_types_test.dart index 0269eae8bf1..9a4a46a43f4 100644 --- a/tests/language_strong/const_types_test.dart +++ b/tests/language_strong/const_types_test.dart @@ -14,68 +14,68 @@ class Class implements Superclass { use(const []); use(const []); use(const >[]); - use(const >[]); //# 01: static type warning - use(const []); //# 02: static type warning + use(const >[]); /// 01: static type warning + use(const []); /// 02: static type warning use(const {}); - use(const {}); //# 03: static type warning + use(const {}); /// 03: static type warning use(const {}); use(const >{}); - use(const >{}); //# 04: static type warning - use(const {}); //# 05: static type warning + use(const >{}); /// 04: static type warning + use(const {}); /// 05: static type warning use(const Class()); use(const Class()); - use(const Class()); //# 06: static type warning - use(const Class()); //# 07: compile-time error - use(const Class>()); //# 08: compile-time error + use(const Class()); /// 06: static type warning + use(const Class()); /// 07: compile-time error + use(const Class>()); /// 08: compile-time error - use(const Unresolved()); //# 09: compile-time error - use(const Unresolved()); //# 10: compile-time error - use(const prefix.Unresolved()); //# 11: compile-time error - use(const prefix.Unresolved()); //# 12: compile-time error + use(const Unresolved()); /// 09: compile-time error + use(const Unresolved()); /// 10: compile-time error + use(const prefix.Unresolved()); /// 11: compile-time error + use(const prefix.Unresolved()); /// 12: compile-time error use(const Class.named()); use(const Class.named()); - use(const Class.named()); //# 13: static type warning - use(const Class.named()); //# 14: compile-time error - use(const Class>.named()); //# 15: compile-time error + use(const Class.named()); /// 13: static type warning + use(const Class.named()); /// 14: compile-time error + use(const Class>.named()); /// 15: compile-time error - use(const Class.nonamed()); //# 16: compile-time error - use(const Class.nonamed()); //# 17: compile-time error - use(const Class.nonamed()); //# 18: compile-time error - use(const Class.nonamed()); //# 19: compile-time error - use(const Class>.nonamed()); //# 20: compile-time error + use(const Class.nonamed()); /// 16: compile-time error + use(const Class.nonamed()); /// 17: compile-time error + use(const Class.nonamed()); /// 18: compile-time error + use(const Class.nonamed()); /// 19: compile-time error + use(const Class>.nonamed()); /// 20: compile-time error - use(const Unresolved.named()); //# 21: compile-time error - use(const Unresolved.named()); //# 22: compile-time error + use(const Unresolved.named()); /// 21: compile-time error + use(const Unresolved.named()); /// 22: compile-time error } } class Superclass { - const factory Superclass() = Unresolved; //# 23: compile-time error - const factory Superclass() = Unresolved; //# 24: compile-time error - const factory Superclass() = Unresolved.named; //# 25: compile-time error - const factory Superclass() = Unresolved.named; //# 26: compile-time error + const factory Superclass() = Unresolved; /// 23: compile-time error + const factory Superclass() = Unresolved; /// 24: compile-time error + const factory Superclass() = Unresolved.named; /// 25: compile-time error + const factory Superclass() = Unresolved.named; /// 26: compile-time error - const factory Superclass() = prefix.Unresolved; //# 27: compile-time error - const factory Superclass() = prefix.Unresolved; //# 28: compile-time error - const factory Superclass() = prefix.Unresolved.named; //# 29: compile-time error - const factory Superclass() = prefix.Unresolved.named; //# 30: compile-time error + const factory Superclass() = prefix.Unresolved; /// 27: compile-time error + const factory Superclass() = prefix.Unresolved; /// 28: compile-time error + const factory Superclass() = prefix.Unresolved.named; /// 29: compile-time error + const factory Superclass() = prefix.Unresolved.named; /// 30: compile-time error - const factory Superclass() = Class; //# 31: ok - const factory Superclass() = Class; //# 32: ok - const factory Superclass() = Class; //# 33: ok - const factory Superclass() = Class>; //# 34: ok - const factory Superclass() = Class; //# 35: static type warning + const factory Superclass() = Class; /// 31: ok + const factory Superclass() = Class; /// 32: ok + const factory Superclass() = Class; /// 33: ok + const factory Superclass() = Class>; /// 34: ok + const factory Superclass() = Class; /// 35: static type warning - const factory Superclass() = Class.named; //# 36: ok - const factory Superclass() = Class.named; //# 37: ok - const factory Superclass() = Class.named; //# 38: ok - const factory Superclass() = Class>.named; //# 39: ok - const factory Superclass() = Class.named; //# 40: static type warning + const factory Superclass() = Class.named; /// 36: ok + const factory Superclass() = Class.named; /// 37: ok + const factory Superclass() = Class.named; /// 38: ok + const factory Superclass() = Class>.named; /// 39: ok + const factory Superclass() = Class.named; /// 40: static type warning - const factory Superclass() = T; //# 41: compile-time error + const factory Superclass() = T; /// 41: compile-time error } void main() { diff --git a/tests/language_strong/constant_locals_test.dart b/tests/language_strong/constant_locals_test.dart index f506a02729f..bd852407f9e 100644 --- a/tests/language_strong/constant_locals_test.dart +++ b/tests/language_strong/constant_locals_test.dart @@ -7,13 +7,13 @@ import "package:expect/expect.dart"; void main() { - const c1; //# 01: compile-time error + const c1; /// 01: compile-time error const c2 = 0; - const c3 = field; //# 02: compile-time error - const c4 = finalField; //# 03: compile-time error + const c3 = field; /// 02: compile-time error + const c4 = finalField; /// 03: compile-time error const c5 = constField; - const c6 = method(); //# 04: compile-time error - const c7 = new Class(); //# 05: compile-time error + const c6 = method(); /// 04: compile-time error + const c7 = new Class(); /// 05: compile-time error const c8 = const Class(); } diff --git a/tests/language_strong/constant_type_literal_test.dart b/tests/language_strong/constant_type_literal_test.dart index 6243a7d2956..a63ec1b60b4 100644 --- a/tests/language_strong/constant_type_literal_test.dart +++ b/tests/language_strong/constant_type_literal_test.dart @@ -7,7 +7,7 @@ class C { void m() { const List lst = const [ - T //# 01: compile-time error + T /// 01: compile-time error ]; } } diff --git a/tests/language_strong/constructor10_test.dart b/tests/language_strong/constructor10_test.dart index b6f94bd324e..2906632b5d6 100644 --- a/tests/language_strong/constructor10_test.dart +++ b/tests/language_strong/constructor10_test.dart @@ -11,17 +11,17 @@ class A { } class B extends A { - /* // //# 00: compile-time error + /* // /// 00: compile-time error B() : super(null); - */ // //# 00: continued + */ // /// 00: continued } // ========== class Y extends A { - /* // //# 01: compile-time error + /* // /// 01: compile-time error Y() : super(null); - */ // //# 01: continued + */ // /// 01: continued } class Z extends Y { @@ -31,9 +31,9 @@ class Z extends Y { // ============== class G extends A { - /* // //# 02: compile-time error + /* // /// 02: compile-time error G() : super(null); - */ // //# 02: continued + */ // /// 02: continued } class H extends G { diff --git a/tests/language_strong/constructor9_test.dart b/tests/language_strong/constructor9_test.dart index 2e2da6ea2e6..51142699b48 100644 --- a/tests/language_strong/constructor9_test.dart +++ b/tests/language_strong/constructor9_test.dart @@ -8,7 +8,7 @@ class Klass { Klass(var v): field_ = v { } - final uninitializedFinalField_; // //# 01: static type warning + final uninitializedFinalField_; // /// 01: static type warning var field_; } diff --git a/tests/language_strong/constructor_call_as_function_test.dart b/tests/language_strong/constructor_call_as_function_test.dart index 5467c0789c1..cbb38ef5df6 100644 --- a/tests/language_strong/constructor_call_as_function_test.dart +++ b/tests/language_strong/constructor_call_as_function_test.dart @@ -12,5 +12,5 @@ class Point { } main() { - Point p = Point(1, 2); // //# 01: static type warning, runtime error + Point p = Point(1, 2); // /// 01: static type warning, runtime error } diff --git a/tests/language_strong/constructor_duplicate_final_test.dart b/tests/language_strong/constructor_duplicate_final_test.dart index e51f3124273..0c2169926cf 100644 --- a/tests/language_strong/constructor_duplicate_final_test.dart +++ b/tests/language_strong/constructor_duplicate_final_test.dart @@ -8,17 +8,17 @@ class Class { final f = 10; - Class(v) : f = v; // //# 01: runtime error, static type warning + Class(v) : f = v; // /// 01: runtime error, static type warning - Class(this.f); // //# 02: runtime error, static type warning + Class(this.f); // /// 02: runtime error, static type warning // If a field is initialized multiple times in the initializer // list, it's a compile time error. - Class(this.f) : f = 0; // //# 03: compile-time error + Class(this.f) : f = 0; // /// 03: compile-time error } main() { - new Class(5); // //# 01: continued - new Class(5); // //# 02: continued - new Class(5); // //# 03: continued + new Class(5); // /// 01: continued + new Class(5); // /// 02: continued + new Class(5); // /// 03: continued } diff --git a/tests/language_strong/constructor_duplicate_initializers_test.dart b/tests/language_strong/constructor_duplicate_initializers_test.dart index ed01c1674bf..9748beec1c7 100644 --- a/tests/language_strong/constructor_duplicate_initializers_test.dart +++ b/tests/language_strong/constructor_duplicate_initializers_test.dart @@ -8,16 +8,16 @@ class Class { Class(var v) : field_ = v // Test against duplicate final field initializaion in initializing list. - , field_ = 2 // //# 01: compile-time error + , field_ = 2 // /// 01: compile-time error ; Class.field(this.field_) // Test against duplicate final field initialization between initializing // formals and initializer list. - : field_ = 2 // //# 02: compile-time error + : field_ = 2 // /// 02: compile-time error ; // Test against duplicate final field initialization in initializing formals. Class.two_fields(this.field_ - , this.field_ //# 03: compile-time error + , this.field_ /// 03: compile-time error ); final field_; } @@ -26,6 +26,6 @@ main() { new Class(42); new Class.field(42); new Class.two_fields(42 - , 42 // //# 03: continued + , 42 // /// 03: continued ); } diff --git a/tests/language_strong/constructor_initializer_test.dart b/tests/language_strong/constructor_initializer_test.dart index cae3ca1028c..a4dec3f107d 100644 --- a/tests/language_strong/constructor_initializer_test.dart +++ b/tests/language_strong/constructor_initializer_test.dart @@ -11,7 +11,7 @@ class A { // is remembered in the constructor body. Expect.equals(x, _x + 1); Expect.equals(y, _y + 1); - Expect.isFalse(?y); // //# 01: compile-time error + Expect.isFalse(?y); // /// 01: compile-time error } } diff --git a/tests/language_strong/constructor_name_test.dart b/tests/language_strong/constructor_name_test.dart index 7559d2eaf46..93742a6e636 100644 --- a/tests/language_strong/constructor_name_test.dart +++ b/tests/language_strong/constructor_name_test.dart @@ -3,14 +3,14 @@ // BSD-style license that can be found in the LICENSE file. class Foo { - Bar.Foo(); //# 01: compile-time error - factory Bar(); //# 02: compile-time error - factory Bar.Baz(); //# 03: compile-time error + Bar.Foo(); /// 01: compile-time error + factory Bar(); /// 02: compile-time error + factory Bar.Baz(); /// 03: compile-time error } void main() { new Foo(); - new Foo.Foo(); //# 01: continued - new Foo.Baz(); //# 03: continued + new Foo.Foo(); /// 01: continued + new Foo.Baz(); /// 03: continued } \ No newline at end of file diff --git a/tests/language_strong/constructor_named_arguments_test.dart b/tests/language_strong/constructor_named_arguments_test.dart index e04a52a9ca5..42de7a8a206 100644 --- a/tests/language_strong/constructor_named_arguments_test.dart +++ b/tests/language_strong/constructor_named_arguments_test.dart @@ -23,7 +23,7 @@ class X { X({a: 'defa', b: 'defb'}) : this.i = a, this.j = b; X.foo() : this(b: 1, a: 2); X.bar() : this( - 1, // //# 01: static type warning, runtime error + 1, // /// 01: static type warning, runtime error a: 2); X.baz() : this(a: 1, b: 2); X.qux() : this(b: 2); diff --git a/tests/language_strong/constructor_redirect2_test.dart b/tests/language_strong/constructor_redirect2_test.dart index e16ea83811a..b094585094b 100644 --- a/tests/language_strong/constructor_redirect2_test.dart +++ b/tests/language_strong/constructor_redirect2_test.dart @@ -8,22 +8,22 @@ class A { A(this.x) {} // Redirecting constructor must not have a function body. - A.illegalBody(x) : this(3) {} // //# 01: compile-time error + A.illegalBody(x) : this(3) {} // /// 01: compile-time error // Redirecting constructor must not initialize any fields. - A.illegalInit() : this(3), x = 5; // //# 02: compile-time error + A.illegalInit() : this(3), x = 5; // /// 02: compile-time error // Redirecting constructor must not have initializing formal parameters. - A.illegalFormal(this.x) : this(3); // //# 03: compile-time error + A.illegalFormal(this.x) : this(3); // /// 03: compile-time error // Redirection constructors must not call super constructor. - A.illegalSuper() : this(3), super(3); // //# 04: compile-time error + A.illegalSuper() : this(3), super(3); // /// 04: compile-time error } main() { new A(3); - new A.illegalBody(10); // //# 01: continued - new A.illegalInit(10); // //# 02: continued - new A.illegalFormal(10); // //# 03: continued - new A.illegalSuper(10); // //# 04: continued + new A.illegalBody(10); // /// 01: continued + new A.illegalInit(10); // /// 02: continued + new A.illegalFormal(10); // /// 03: continued + new A.illegalSuper(10); // /// 04: continued } diff --git a/tests/language_strong/constructor_redirect_test.dart b/tests/language_strong/constructor_redirect_test.dart index 3b0e070f678..1667493d574 100644 --- a/tests/language_strong/constructor_redirect_test.dart +++ b/tests/language_strong/constructor_redirect_test.dart @@ -19,7 +19,7 @@ class A { // staticFun isn't really a static function and should cause a // compile-time error. static - moreStaticFun() {} //# 01: compile-time error + moreStaticFun() {} /// 01: compile-time error int staticFun(int v1, int v2) { return v1 * v2; } diff --git a/tests/language_strong/constructor_return_test.dart b/tests/language_strong/constructor_return_test.dart index c971ed3f278..4361a53cf89 100644 --- a/tests/language_strong/constructor_return_test.dart +++ b/tests/language_strong/constructor_return_test.dart @@ -10,26 +10,26 @@ class A { int x; A(this.x) { return; } A.test1(this.x) { - return this; // //# 01: compile-time error + return this; // /// 01: compile-time error } A.test2(this.x) { - return null; // //# 02: compile-time error + return null; // /// 02: compile-time error } int foo(int y) => x + y; } class B { - B() => null; // //# 03: compile-time error + B() => null; // /// 03: compile-time error } class C { int value; - C() : value = 1 { return null; } // //# 04: compile-time error + C() : value = 1 { return null; } // /// 04: compile-time error } class D { int value; - D(): value = 1 => null; // //# 05: compile-time error + D(): value = 1 => null; // /// 05: compile-time error } main() { diff --git a/tests/language_strong/crash_6725_test.dart b/tests/language_strong/crash_6725_test.dart index 54de50b7d48..420111f5af6 100644 --- a/tests/language_strong/crash_6725_test.dart +++ b/tests/language_strong/crash_6725_test.dart @@ -6,8 +6,8 @@ library crash_6725; -part 'crash_6725_part.dart'; //# 01: static type warning +part 'crash_6725_part.dart'; /// 01: static type warning main() { - test(); //# 01: continued + test(); /// 01: continued } diff --git a/tests/language_strong/create_unresolved_type_test.dart b/tests/language_strong/create_unresolved_type_test.dart index c9fda0e1280..558a14a844e 100644 --- a/tests/language_strong/create_unresolved_type_test.dart +++ b/tests/language_strong/create_unresolved_type_test.dart @@ -3,5 +3,5 @@ // BSD-style license that can be found in the LICENSE file. main() { - new F(); // //# 01: runtime error, static type warning + new F(); // /// 01: runtime error, static type warning } diff --git a/tests/language_strong/cyclic_class_member_test.dart b/tests/language_strong/cyclic_class_member_test.dart index d33d8966b56..63c9651c90c 100644 --- a/tests/language_strong/cyclic_class_member_test.dart +++ b/tests/language_strong/cyclic_class_member_test.dart @@ -5,7 +5,7 @@ // Test that class with a cyclic hierarchy doesn't cause a loop in dart2js. class A - extends A //# 01: compile-time error + extends A /// 01: compile-time error { // When checking that foo isn't overriding an instance method in the // superclass, dart2js might loop. diff --git a/tests/language_strong/cyclic_constructor_test.dart b/tests/language_strong/cyclic_constructor_test.dart index 5a83edd9b20..0116265939a 100644 --- a/tests/language_strong/cyclic_constructor_test.dart +++ b/tests/language_strong/cyclic_constructor_test.dart @@ -5,7 +5,7 @@ class A { A.a() : this.b(); A.b() - : this.a() // //# 01: compile-time error + : this.a() // /// 01: compile-time error ; A.c() : this.b(); } diff --git a/tests/language_strong/cyclic_metadata_test.dart b/tests/language_strong/cyclic_metadata_test.dart index d36b9295b3e..b420ca8aea7 100644 --- a/tests/language_strong/cyclic_metadata_test.dart +++ b/tests/language_strong/cyclic_metadata_test.dart @@ -5,10 +5,10 @@ // Check that metadata on a class 'Super' using subtypes of 'Super' are not // considered as cyclic inheritance or lead to crashes. -@Sub1(0) //# 01: ok +@Sub1(0) /// 01: ok class Super { final field; - @Sub2(1) //# 02: ok + @Sub2(1) /// 02: ok const Super(this.field); } diff --git a/tests/language_strong/cyclic_type_test.dart b/tests/language_strong/cyclic_type_test.dart index 216f1eba4a5..2fc5766ce64 100644 --- a/tests/language_strong/cyclic_type_test.dart +++ b/tests/language_strong/cyclic_type_test.dart @@ -11,21 +11,21 @@ class Base { } // Derived is contractive. -class Derived extends Base> {} // //# 00: ok +class Derived extends Base> {} // /// 00: ok // Derived is contractive. -class Derived extends Base>> {} // //# 01: ok +class Derived extends Base>> {} // /// 01: ok // Derived is non-contractive. -class Derived extends Base>> {} // //# 02: ok +class Derived extends Base>> {} // /// 02: ok // Derived1 and Derived2 are contractive. -class Derived1 extends Base> {} // //# 03: ok -class Derived2 extends Base> {} // //# 03: ok +class Derived1 extends Base> {} // /// 03: ok +class Derived2 extends Base> {} // /// 03: ok // Derived1 and Derived2 are non-contractive. -class Derived1 extends Base> {} // //# 04: ok -class Derived2 extends Base>> {} // //# 04: ok +class Derived1 extends Base> {} // /// 04: ok +class Derived2 extends Base>> {} // /// 04: ok main() { // In the tests below we test that we get "int" and "bool" when calling @@ -34,39 +34,39 @@ main() { // core types so we make sure to handle these specifically in the compiler. var d; - d = new Derived(); // //# 00: continued - Expect.equals("Derived", d.t.toString()); // //# 00: continued - d = new Derived(); // //# 00: continued - Expect.equals("Derived", d.t.toString()); // //# 00: continued - d = new Derived(); // //# 00: continued - Expect.equals("Derived", d.t.toString()); // //# 00: continued + d = new Derived(); // /// 00: continued + Expect.equals("Derived", d.t.toString()); // /// 00: continued + d = new Derived(); // /// 00: continued + Expect.equals("Derived", d.t.toString()); // /// 00: continued + d = new Derived(); // /// 00: continued + Expect.equals("Derived", d.t.toString()); // /// 00: continued - d = new Derived(); // //# 01: continued + d = new Derived(); // /// 01: continued - Expect.equals("Derived>", d.t.toString()); // //# 01: continued - d = new Derived(); // //# 01: continued - Expect.equals("Derived>", d.t.toString()); // //# 01: continued - d = new Derived(); // //# 01: continued - Expect.equals("Derived>", d.t.toString()); // //# 01: continued + Expect.equals("Derived>", d.t.toString()); // /// 01: continued + d = new Derived(); // /// 01: continued + Expect.equals("Derived>", d.t.toString()); // /// 01: continued + d = new Derived(); // /// 01: continued + Expect.equals("Derived>", d.t.toString()); // /// 01: continued - d = new Derived(); // //# 02: continued - Expect.equals("Derived", d.t.toString()); // //# 02: continued - d = new Derived(); // //# 02: continued - Expect.equals("Derived>", d.t.toString()); // //# 02: continued - d = new Derived(); // //# 02: continued - Expect.equals("Derived>", d.t.toString()); // //# 02: continued + d = new Derived(); // /// 02: continued + Expect.equals("Derived", d.t.toString()); // /// 02: continued + d = new Derived(); // /// 02: continued + Expect.equals("Derived>", d.t.toString()); // /// 02: continued + d = new Derived(); // /// 02: continued + Expect.equals("Derived>", d.t.toString()); // /// 02: continued - d = new Derived1(); // //# 03: continued - Expect.equals("Derived2", d.t.toString()); // //# 03: continued - d = new Derived2(); // //# 03: continued - Expect.equals("Derived1", d.t.toString()); // //# 03: continued - d = new Derived2>(); // //# 03: continued - Expect.equals("Derived1>", d.t.toString()); // //# 03: continued + d = new Derived1(); // /// 03: continued + Expect.equals("Derived2", d.t.toString()); // /// 03: continued + d = new Derived2(); // /// 03: continued + Expect.equals("Derived1", d.t.toString()); // /// 03: continued + d = new Derived2>(); // /// 03: continued + Expect.equals("Derived1>", d.t.toString()); // /// 03: continued - d = new Derived1(); // //# 04: continued - Expect.equals("Derived2", d.t.toString()); // //# 04: continued - d = new Derived2(); // //# 04: continued - Expect.equals("Derived1", d.t.toString()); // //# 04: continued - d = new Derived2>(); // //# 04: continued - Expect.equals("Derived1>>", d.t.toString()); // //# 04: continued + d = new Derived1(); // /// 04: continued + Expect.equals("Derived2", d.t.toString()); // /// 04: continued + d = new Derived2(); // /// 04: continued + Expect.equals("Derived1", d.t.toString()); // /// 04: continued + d = new Derived2>(); // /// 04: continued + Expect.equals("Derived1>>", d.t.toString()); // /// 04: continued } diff --git a/tests/language_strong/cyclic_type_variable_test.dart b/tests/language_strong/cyclic_type_variable_test.dart index a6d6118c999..79c2937cfc9 100644 --- a/tests/language_strong/cyclic_type_variable_test.dart +++ b/tests/language_strong/cyclic_type_variable_test.dart @@ -9,14 +9,14 @@ class Base {} class Derived extends Base {} // legal typedef void funcType(T arg); class DerivedFunc extends Base> { } abstract class A { S field; } @@ -26,13 +26,13 @@ abstract class B> { // legal } class C1 { V field; } class C2 implements A { V field; } diff --git a/tests/language_strong/cyclic_typedef_test.dart b/tests/language_strong/cyclic_typedef_test.dart index 1f42e613fa3..c660527612e 100644 --- a/tests/language_strong/cyclic_typedef_test.dart +++ b/tests/language_strong/cyclic_typedef_test.dart @@ -9,47 +9,47 @@ typedef // Cyclic through return type. -A //# 01: compile-time error +A /// 01: compile-time error A // The name of the typedef // Cyclic through type variable bound. - //# 10: compile-time error + /// 10: compile-time error // Cyclic through generic type variable bound. -> //# 11: compile-time error +> /// 11: compile-time error ( // The left parenthesis of the typedef arguments. // Cyclic through parameter type. -A a //# 02: compile-time error +A a /// 02: compile-time error // Cyclic through optional parameter type. -[A a] //# 03: compile-time error +[A a] /// 03: compile-time error // Cyclic through named parameter type. -{A a} //# 04: compile-time error +{A a} /// 04: compile-time error // Cyclic through generic parameter type. -List a //# 05: compile-time error +List a /// 05: compile-time error // Cyclic through return type of function typed parameter. -A f() //# 06: compile-time error +A f() /// 06: compile-time error // Cyclic through parameter type of function typed parameter. -f(A a) //# 07: compile-time error +f(A a) /// 07: compile-time error // Cyclic through another typedef. -B b //# 08: compile-time error +B b /// 08: compile-time error // Cyclic through another more typedefs. -C c //# 09: compile-time error +C c /// 09: compile-time error // Reference through a class is not a cyclic self-reference. -Class c //# 12: ok +Class c /// 12: ok // Reference through a class type bound is not a cyclic self-reference. -Class c //# 13: ok +Class c /// 13: ok ); // The right parenthesis of the typedef arguments. @@ -57,9 +57,9 @@ typedef B(A a); typedef C(B b); class Class - //# 13: continued + /// 13: continued { - A a; //# 12: continued + A a; /// 12: continued } void testA(A a) {} diff --git a/tests/language_strong/default_factory2_test.dart b/tests/language_strong/default_factory2_test.dart index 7eaeb8f97f7..30c097bf48b 100644 --- a/tests/language_strong/default_factory2_test.dart +++ b/tests/language_strong/default_factory2_test.dart @@ -15,5 +15,5 @@ class A implements IA { } main() { - var result = new IA(); // //# 01: static type warning, dynamic type error + var result = new IA(); // /// 01: static type warning, dynamic type error } diff --git a/tests/language_strong/default_factory_test.dart b/tests/language_strong/default_factory_test.dart index 820d741d932..bac3a04b773 100644 --- a/tests/language_strong/default_factory_test.dart +++ b/tests/language_strong/default_factory_test.dart @@ -7,7 +7,7 @@ import "package:expect/expect.dart"; // Dart test program for testing default factories. abstract class Vehicle { - factory Vehicle() = GoogleOne.Vehicle; //# 01: static type warning + factory Vehicle() = GoogleOne.Vehicle; /// 01: static type warning } @@ -31,5 +31,5 @@ class GoogleOne implements SpaceShip { main() { Expect.equals(true, (new Bike.redOne()) is Bike); Expect.equals(true, (new SpaceShip()) is GoogleOne); - Expect.equals(true, (new Vehicle()) is Bike); //# 01: continued + Expect.equals(true, (new Vehicle()) is Bike); /// 01: continued } diff --git a/tests/language_strong/default_implementation2_test.dart b/tests/language_strong/default_implementation2_test.dart index 2336935dcdc..1b7a3e13732 100644 --- a/tests/language_strong/default_implementation2_test.dart +++ b/tests/language_strong/default_implementation2_test.dart @@ -8,7 +8,7 @@ abstract class Point { } class PointImplementation implements Point { - PointImplementation(int x, int y) {} //# static type warning + PointImplementation(int x, int y) {} /// static type warning } main() { diff --git a/tests/language_strong/deferred_constraints_constants_test.dart b/tests/language_strong/deferred_constraints_constants_test.dart index a45ed15034d..b7e2244b8de 100644 --- a/tests/language_strong/deferred_constraints_constants_test.dart +++ b/tests/language_strong/deferred_constraints_constants_test.dart @@ -9,35 +9,35 @@ import 'dart:mirrors'; import "deferred_constraints_constants_lib.dart" deferred as lib; const myConst1 = - lib.constantInstance; //# reference1: compile-time error - /* // //# reference1: continued + lib.constantInstance; /// reference1: compile-time error + /* // /// reference1: continued 499; - */ // //# reference1: continued + */ // /// reference1: continued const myConst2 = - lib.Const.instance; //# reference2: compile-time error - /* // //# reference2: continued + lib.Const.instance; /// reference2: compile-time error + /* // /// reference2: continued 499; - */ // //# reference2: continued + */ // /// reference2: continued void f1({a: - const lib.Const() //# default_argument1: compile-time error - /* // //# default_argument1: continued + const lib.Const() /// default_argument1: compile-time error + /* // /// default_argument1: continued 499 - */ // //# default_argument1: continued + */ // /// default_argument1: continued }) {} void f2({a: - lib.constantInstance //# default_argument2: compile-time error - /* // //# default_argument2: continued + lib.constantInstance /// default_argument2: compile-time error + /* // /// default_argument2: continued 499 - */ // //# default_argument2: continued + */ // /// default_argument2: continued }) {} -@lib.Const() //# metadata1: compile-time error +@lib.Const() /// metadata1: compile-time error class H1 {} -@lib.Const.instance //# metadata2: compile-time error +@lib.Const.instance /// metadata2: compile-time error class H2 {} -@lib.Const.namedConstructor() //# metadata3: compile-time error +@lib.Const.namedConstructor() /// metadata3: compile-time error class H3 {} void main() { @@ -47,11 +47,11 @@ void main() { asyncStart(); lib.loadLibrary().then((_) { var instance = lib.constantInstance; - var c1 = const lib.Const(); //# constructor1: compile-time error - var c2 = const lib.Const.namedConstructor(); //# constructor2: compile-time error + var c1 = const lib.Const(); /// constructor1: compile-time error + var c2 = const lib.Const.namedConstructor(); /// constructor2: compile-time error f1(); f2(); - var constInstance = lib.constantInstance; //# reference_after_load: ok + var constInstance = lib.constantInstance; /// reference_after_load: ok var h1 = new H1(); var h2 = new H2(); var h3 = new H3(); diff --git a/tests/language_strong/deferred_constraints_type_annotation_test.dart b/tests/language_strong/deferred_constraints_type_annotation_test.dart index 44e0c276225..49169bc63fd 100644 --- a/tests/language_strong/deferred_constraints_type_annotation_test.dart +++ b/tests/language_strong/deferred_constraints_type_annotation_test.dart @@ -6,45 +6,45 @@ import 'package:expect/expect.dart'; import 'package:async_helper/async_helper.dart'; import "deferred_constraints_lib.dart" deferred as lib; -import "deferred_constraints_lib.dart" as lib2; //# type_annotation_non_deferred: ok +import "deferred_constraints_lib.dart" as lib2; /// type_annotation_non_deferred: ok class F {} class G2 {} main() { - lib.C a = null; //# type_annotation_null: compile-time error - Expect.throws(() { //# new_before_load: compile-time error - lib.C a = new lib.C(); //# new_before_load: continued - }, (e) => e is Error); //# new_before_load: continued + lib.C a = null; /// type_annotation_null: compile-time error + Expect.throws(() { /// new_before_load: compile-time error + lib.C a = new lib.C(); /// new_before_load: continued + }, (e) => e is Error); /// new_before_load: continued // In this case we do not defer C. - lib2.C a1 = new lib2.C(); //# type_annotation_non_deferred: continued + lib2.C a1 = new lib2.C(); /// type_annotation_non_deferred: continued asyncStart(); lib.loadLibrary().then((_) { - lib.C a2 = new lib.C(); //# type_annotation1: dynamic type error, compile-time error - lib.G a3 = new lib.G(); //# type_annotation_generic1: dynamic type error, compile-time error - G2 a4 = new G2(); //# type_annotation_generic2: compile-time error - G2 a5 = new G2(); //# type_annotation_generic3: compile-time error - lib.G a = new lib.G(); //# type_annotation_generic4: dynamic type error, compile-time error - var a6 = new lib.C(); //# new: ok - var g1 = new lib.G(); //# new_generic1: ok + lib.C a2 = new lib.C(); /// type_annotation1: dynamic type error, compile-time error + lib.G a3 = new lib.G(); /// type_annotation_generic1: dynamic type error, compile-time error + G2 a4 = new G2(); /// type_annotation_generic2: compile-time error + G2 a5 = new G2(); /// type_annotation_generic3: compile-time error + lib.G a = new lib.G(); /// type_annotation_generic4: dynamic type error, compile-time error + var a6 = new lib.C(); /// new: ok + var g1 = new lib.G(); /// new_generic1: ok // new G2() does not give a dynamic type error because a malformed // type used as type-parameter is treated as dynamic. - var g2 = new G2(); //# new_generic2: compile-time error - var g3 = new lib.G(); //# new_generic3: compile-time error + var g2 = new G2(); /// new_generic2: compile-time error + var g3 = new lib.G(); /// new_generic3: compile-time error var instance = lib.constantInstance; - Expect.throws(() { //# is_check: compile-time error - bool a7 = instance is lib.Const; //# is_check: continued - }, (e) => e is TypeError); //# is_check: continued - Expect.throws(() { //# as_operation: compile-time error - instance as lib.Const; //# as_operation: continued - }, (e) => e is TypeError); //# as_operation: continued - Expect.throws(() { //# catch_check: compile-time error - try { throw instance; } on lib.Const {} //# catch_check: continued - }, (e) => e is TypeError); //# catch_check: continued - int i = lib.C.staticMethod(); //# static_method: ok + Expect.throws(() { /// is_check: compile-time error + bool a7 = instance is lib.Const; /// is_check: continued + }, (e) => e is TypeError); /// is_check: continued + Expect.throws(() { /// as_operation: compile-time error + instance as lib.Const; /// as_operation: continued + }, (e) => e is TypeError); /// as_operation: continued + Expect.throws(() { /// catch_check: compile-time error + try { throw instance; } on lib.Const {} /// catch_check: continued + }, (e) => e is TypeError); /// catch_check: continued + int i = lib.C.staticMethod(); /// static_method: ok asyncEnd(); }); } -lib.C a9 = null; //# type_annotation_top_level: compile-time error +lib.C a9 = null; /// type_annotation_top_level: compile-time error diff --git a/tests/language_strong/deferred_duplicate_prefix1_test.dart b/tests/language_strong/deferred_duplicate_prefix1_test.dart index 1807e925977..fe6acca1b06 100644 --- a/tests/language_strong/deferred_duplicate_prefix1_test.dart +++ b/tests/language_strong/deferred_duplicate_prefix1_test.dart @@ -3,6 +3,6 @@ // BSD-style license that can be found in the LICENSE file. import "deferred_prefix_constraints_lib2.dart" as lib; -import "deferred_prefix_constraints_lib.dart" deferred as lib; //# 01: compile-time error +import "deferred_prefix_constraints_lib.dart" deferred as lib; /// 01: compile-time error void main() {} diff --git a/tests/language_strong/deferred_duplicate_prefix2_test.dart b/tests/language_strong/deferred_duplicate_prefix2_test.dart index 1edfeca7b18..0be28851ac0 100644 --- a/tests/language_strong/deferred_duplicate_prefix2_test.dart +++ b/tests/language_strong/deferred_duplicate_prefix2_test.dart @@ -2,7 +2,7 @@ // 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 "deferred_prefix_constraints_lib.dart" deferred as lib; // //# 01: compile-time error +import "deferred_prefix_constraints_lib.dart" deferred as lib; // /// 01: compile-time error import "deferred_prefix_constraints_lib2.dart" as lib; void main() {} diff --git a/tests/language_strong/deferred_duplicate_prefix3_test.dart b/tests/language_strong/deferred_duplicate_prefix3_test.dart index 08d8bd19ec5..dc3e85bc9ff 100644 --- a/tests/language_strong/deferred_duplicate_prefix3_test.dart +++ b/tests/language_strong/deferred_duplicate_prefix3_test.dart @@ -2,7 +2,7 @@ // 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 "deferred_prefix_constraints_lib.dart" deferred as lib; //# 01: compile-time error -import "deferred_prefix_constraints_lib2.dart" deferred as lib; //# 01: continued +import "deferred_prefix_constraints_lib.dart" deferred as lib; /// 01: compile-time error +import "deferred_prefix_constraints_lib2.dart" deferred as lib; /// 01: continued void main() {} diff --git a/tests/language_strong/deferred_inheritance_constraints_test.dart b/tests/language_strong/deferred_inheritance_constraints_test.dart index 2e2cf51bdd6..ff009e69fcf 100644 --- a/tests/language_strong/deferred_inheritance_constraints_test.dart +++ b/tests/language_strong/deferred_inheritance_constraints_test.dart @@ -9,20 +9,20 @@ class Foo {} class Foo2 extends D {} class A extends - lib. //# extends: compile-time error + lib. /// extends: compile-time error Foo {} class B implements - lib. //# implements: compile-time error + lib. /// implements: compile-time error Foo {} class C1 {} class C = C1 with - lib. //# mixin: compile-time error + lib. /// mixin: compile-time error Foo; class D { D() ; factory D.factory() = - lib. //# redirecting_constructor: static type warning + lib. /// redirecting_constructor: static type warning Foo2; } @@ -30,7 +30,7 @@ void main() { new A(); new B(); new C(); - Expect.throws(() { //# redirecting_constructor: continued + Expect.throws(() { /// redirecting_constructor: continued new D.factory(); - }); //# redirecting_constructor: continued + }); /// redirecting_constructor: continued } \ No newline at end of file diff --git a/tests/language_strong/deferred_load_constants_test.dart b/tests/language_strong/deferred_load_constants_test.dart index f56414c5080..2d795f431b9 100644 --- a/tests/language_strong/deferred_load_constants_test.dart +++ b/tests/language_strong/deferred_load_constants_test.dart @@ -24,11 +24,11 @@ main() { Expect.identical(toplevel, foo.toplevel); Expect.identical(C.staticfun, foo.C.staticfun); // Access through deferred prefix is not a constant expression. - Expect.throws(() => const [foo.c]); // //# 01: compile-time error - Expect.throws(() => const [foo.C]); // //# 02: compile-time error - Expect.throws(() => const [foo.funtype]); // //# 03: compile-time error - Expect.throws(() => const [foo.toplevel]); // //# 04: compile-time error - Expect.throws(() => const [foo.C.staticfun]); // //# 05: compile-time error + Expect.throws(() => const [foo.c]); // /// 01: compile-time error + Expect.throws(() => const [foo.C]); // /// 02: compile-time error + Expect.throws(() => const [foo.funtype]); // /// 03: compile-time error + Expect.throws(() => const [foo.toplevel]); // /// 04: compile-time error + Expect.throws(() => const [foo.C.staticfun]); // /// 05: compile-time error asyncEnd(); }); diff --git a/tests/language_strong/deferred_load_library_wrong_args_test.dart b/tests/language_strong/deferred_load_library_wrong_args_test.dart index c4bbc1430f9..81f697363d6 100644 --- a/tests/language_strong/deferred_load_library_wrong_args_test.dart +++ b/tests/language_strong/deferred_load_library_wrong_args_test.dart @@ -3,6 +3,6 @@ import "deferred_load_library_wrong_args_lib.dart" deferred as lib; void main() { // Loadlibrary should be called without arguments. lib.loadLibrary( - 10 //# 01: runtime error + 10 /// 01: runtime error ); } \ No newline at end of file diff --git a/tests/language_strong/deferred_no_prefix_test.dart b/tests/language_strong/deferred_no_prefix_test.dart index e4012400780..c81b47c34c1 100644 --- a/tests/language_strong/deferred_no_prefix_test.dart +++ b/tests/language_strong/deferred_no_prefix_test.dart @@ -4,7 +4,7 @@ // Loading a deferred library without prefix is not allowed. import "deferred_constraints_lib2.dart" - deferred //# 01: compile-time error + deferred /// 01: compile-time error ; void main() { diff --git a/tests/language_strong/deferred_type_dependency_test.dart b/tests/language_strong/deferred_type_dependency_test.dart index c4917cbbd2e..766834e81b5 100644 --- a/tests/language_strong/deferred_type_dependency_test.dart +++ b/tests/language_strong/deferred_type_dependency_test.dart @@ -13,18 +13,18 @@ main() async { await lib1.loadLibrary(); // Split the cases into a multi-test to test each feature separately. Expect.isFalse( - lib1.fooIs //# is: ok - lib1.fooAs //# as: ok - lib1.fooAnnotation //# type_annotation: ok + lib1.fooIs /// is: ok + lib1.fooAs /// as: ok + lib1.fooAnnotation /// type_annotation: ok ("string") - is! String //# none: ok + is! String /// none: ok ); await lib2.loadLibrary(); Expect.isTrue( - lib1.fooIs //# is: ok - lib1.fooAs //# as: ok - lib1.fooAnnotation //# type_annotation: ok + lib1.fooIs /// is: ok + lib1.fooAs /// as: ok + lib1.fooAnnotation /// type_annotation: ok (lib2.getInstance()) - is! String //# none: ok + is! String /// none: ok ); } \ No newline at end of file diff --git a/tests/language_strong/duplicate_constructor_test.dart b/tests/language_strong/duplicate_constructor_test.dart index 45b344afcd0..816153bbfaf 100644 --- a/tests/language_strong/duplicate_constructor_test.dart +++ b/tests/language_strong/duplicate_constructor_test.dart @@ -4,7 +4,7 @@ class Foo { Foo(); - Foo(); //# 01: compile-time error + Foo(); /// 01: compile-time error } main() { diff --git a/tests/language_strong/duplicate_implements_test.dart b/tests/language_strong/duplicate_implements_test.dart index 8bb74e3a0d0..c85e40c98fb 100644 --- a/tests/language_strong/duplicate_implements_test.dart +++ b/tests/language_strong/duplicate_implements_test.dart @@ -8,15 +8,15 @@ abstract class I { } abstract class J { } abstract class K { } -class X implements I, J, I { } // //# 01: compile-time error -class X implements J, I, K, K { } // //# 02: compile-time error +class X implements I, J, I { } // /// 01: compile-time error +class X implements J, I, K, K { } // /// 02: compile-time error -abstract class Z implements I, J, J { } // //# 03: compile-time error -abstract class Z implements K, K { } // //# 04: compile-time error +abstract class Z implements I, J, J { } // /// 03: compile-time error +abstract class Z implements K, K { } // /// 04: compile-time error main() { - X x = new X(); // //# 01: continued - X x = new X(); // //# 02: continued - Z z = new Z(); // //# 03: continued - Z z = new Z(); // //# 04: continued + X x = new X(); // /// 01: continued + X x = new X(); // /// 02: continued + Z z = new Z(); // /// 03: continued + Z z = new Z(); // /// 04: continued } diff --git a/tests/language_strong/duplicate_interface_negative_test.dart b/tests/language_strong/duplicate_interface_negative_test.dart index c7e9f855a4e..444c02b5077 100644 --- a/tests/language_strong/duplicate_interface_negative_test.dart +++ b/tests/language_strong/duplicate_interface_negative_test.dart @@ -10,7 +10,7 @@ import "duplicate_interface_lib.dart" show InterfA; // Expect error since InterfA and alib.InterfA refer to the same interface. -class Foo implements InterfA, alib.InterfA { } //# compile-time error +class Foo implements InterfA, alib.InterfA { } /// compile-time error main() { diff --git a/tests/language_strong/dynamic2_test.dart b/tests/language_strong/dynamic2_test.dart index a4081fbf87f..a19ee4f1679 100644 --- a/tests/language_strong/dynamic2_test.dart +++ b/tests/language_strong/dynamic2_test.dart @@ -5,8 +5,8 @@ // Test the prohibited use of 'dynamic' in extending and implementing classes. class A - extends dynamic // //# 00: compile-time error - implements dynamic // //# 01: compile-time error + extends dynamic // /// 00: compile-time error + implements dynamic // /// 01: compile-time error { } diff --git a/tests/language_strong/dynamic_field_test.dart b/tests/language_strong/dynamic_field_test.dart index 557c6741f7d..5328471aacb 100644 --- a/tests/language_strong/dynamic_field_test.dart +++ b/tests/language_strong/dynamic_field_test.dart @@ -13,12 +13,12 @@ class A extends C { class C { foo() { - print(a); //# 01: static type warning - return a; //# 01: continued + print(a); /// 01: static type warning + return a; /// 01: continued } bar() { - print(b.a); //# 02: static type warning - return b.a; //# 02: continued + print(b.a); /// 02: static type warning + return b.a; /// 02: continued } } @@ -26,6 +26,6 @@ main() { var a = new A(); a.a = 1; a.b = a; - Expect.equals(1, a.foo()); //# 01: continued - Expect.equals(1, a.bar()); //# 02: continued + Expect.equals(1, a.foo()); /// 01: continued + Expect.equals(1, a.bar()); /// 02: continued } diff --git a/tests/language_strong/dynamic_prefix_core_test.dart b/tests/language_strong/dynamic_prefix_core_test.dart index 24bf79a2f6f..610f8e47acb 100644 --- a/tests/language_strong/dynamic_prefix_core_test.dart +++ b/tests/language_strong/dynamic_prefix_core_test.dart @@ -11,7 +11,7 @@ void main() { // Should still be available because it is not a member of dart:core. Expect.isTrue(dynamic is mycore.Type); - Expect.throws(() => mycore.dynamic is mycore.Type, // //# 01: static type warning - (e) => e is mycore.NoSuchMethodError, // //# 01: continued - 'dynamic is not a member of dart:core'); //# 01: continued + Expect.throws(() => mycore.dynamic is mycore.Type, // /// 01: static type warning + (e) => e is mycore.NoSuchMethodError, // /// 01: continued + 'dynamic is not a member of dart:core'); /// 01: continued } diff --git a/tests/language_strong/enum_duplicate_test.dart b/tests/language_strong/enum_duplicate_test.dart index 0f123b8aac0..9222a6f3ae7 100644 --- a/tests/language_strong/enum_duplicate_test.dart +++ b/tests/language_strong/enum_duplicate_test.dart @@ -10,8 +10,8 @@ library enum_duplicate_test; import 'package:expect/expect.dart'; -import 'enum_duplicate_lib.dart' as lib; //# 01: ok -import 'enum_duplicate_lib.dart' as lib; //# 02: ok +import 'enum_duplicate_lib.dart' as lib; /// 01: ok +import 'enum_duplicate_lib.dart' as lib; /// 02: ok enum Enum1 { A, @@ -25,9 +25,9 @@ enum Enum2 { main() { Expect.equals('Enum1.A,Enum1.B', Enum1.values.join(',')); - Expect.equals('Enum1.A,Enum1.B', lib.Enum1.values.join(',')); //# 01: continued + Expect.equals('Enum1.A,Enum1.B', lib.Enum1.values.join(',')); /// 01: continued Expect.equals('Enum2.A,Enum2.B', Enum2.values.join(',')); - Expect.equals('Enum2.A,Enum2.B', lib.Enum2.values.join(',')); //# 02: continued + Expect.equals('Enum2.A,Enum2.B', lib.Enum2.values.join(',')); /// 02: continued } diff --git a/tests/language_strong/enum_is_keyword_test.dart b/tests/language_strong/enum_is_keyword_test.dart index 5b583d47121..2d24d94810a 100644 --- a/tests/language_strong/enum_is_keyword_test.dart +++ b/tests/language_strong/enum_is_keyword_test.dart @@ -6,5 +6,5 @@ // declarations. main() { - var enum; //# 01: compile-time error + var enum; /// 01: compile-time error } diff --git a/tests/language_strong/enum_private_test.dart b/tests/language_strong/enum_private_test.dart index ce33949c88c..e55b0c2f70f 100644 --- a/tests/language_strong/enum_private_test.dart +++ b/tests/language_strong/enum_private_test.dart @@ -19,8 +19,8 @@ enum Enum1 { main() { Expect.equals('Enum1._A,Enum1._B', Enum1.values.join(',')); - Expect.equals('Enum2._A,Enum2._B', Enum2.values.join(',')); //# 01: ok - Expect.throws(() => Enum2._A, (e) => e is NoSuchMethodError); //# 02: static type warning + Expect.equals('Enum2._A,Enum2._B', Enum2.values.join(',')); /// 01: ok + Expect.throws(() => Enum2._A, (e) => e is NoSuchMethodError); /// 02: static type warning } diff --git a/tests/language_strong/enum_syntax_test.dart b/tests/language_strong/enum_syntax_test.dart index e34bc68da44..c7d5b06b5d4 100644 --- a/tests/language_strong/enum_syntax_test.dart +++ b/tests/language_strong/enum_syntax_test.dart @@ -15,59 +15,59 @@ enum Color { red, orange, yellow, green } enum Veggies { carrot, bean, broccolo, } // Need at least one enumeration identifier. -enum Nada {} // //# 01: compile-time error +enum Nada {} // /// 01: compile-time error // Duplicate entries are a compile-time error -enum ComeAgain { ahau, knust, zipfel, knust, gupf } // //# 02: compile-time error +enum ComeAgain { ahau, knust, zipfel, knust, gupf } // /// 02: compile-time error // Enum entries must not collide with implicitly defined members. -enum ComeAgain { ahau, knust, zipfel, index } //# 03: compile-time error +enum ComeAgain { ahau, knust, zipfel, index } /// 03: compile-time error -enum ComeAgain { ahau, knust, zipfel, values } //# 04: compile-time error +enum ComeAgain { ahau, knust, zipfel, values } /// 04: compile-time error -enum ComeAgain { ahau, knust, zipfel, toString } //# 05: compile-time error +enum ComeAgain { ahau, knust, zipfel, toString } /// 05: compile-time error // Enum entry must not collide with enum type name. -enum ComeAgain { ahau, knust, zipfel, ComeAgain } //# 06: compile-time error +enum ComeAgain { ahau, knust, zipfel, ComeAgain } /// 06: compile-time error // Missing comma. -enum Numbers { one, two, three four, five } // //# 07: compile-time error +enum Numbers { one, two, three four, five } // /// 07: compile-time error // Missing enum type name. -enum { eins, zwei, drei } // //# 08: compile-time error +enum { eins, zwei, drei } // /// 08: compile-time error // Duplicate name in library scope. topLevelFunction() => null; -enum topLevelFunction { bla, blah } // //# 09: compile-time error +enum topLevelFunction { bla, blah } // /// 09: compile-time error class C {} -enum C { bla, blah } // //# 10: compile-time error +enum C { bla, blah } // /// 10: compile-time error var zzTop; -enum zzTop { Billy, Dusty, Frank } // //# 11: compile-time error +enum zzTop { Billy, Dusty, Frank } // /// 11: compile-time error // Enum type cannot be super type or interface type. -class Rainbow extends Color {} // //# 20: compile-time error -class Rainbow implements Color {} // //# 21: compile-time error -class Rainbow extends List with Color {} // //# 22: compile-time error +class Rainbow extends Color {} // /// 20: compile-time error +class Rainbow implements Color {} // /// 21: compile-time error +class Rainbow extends List with Color {} // /// 22: compile-time error main() { - Nada x; //# 01: continued - var x = ComeAgain.zipfel; // //# 02: continued - var x = ComeAgain.zipfel; // //# 03: continued - var x = ComeAgain.zipfel; // //# 04: continued - var x = ComeAgain.zipfel; // //# 05: continued - var x = ComeAgain.zipfel; // //# 06: continued - var x = Numbers.four; // //# 07: continued - var x = topLevelFunction.bla; // //# 09: continued - var x = C.bla; // //# 10: continued - var x = zzTop.Frank; // //# 11: continued + Nada x; /// 01: continued + var x = ComeAgain.zipfel; // /// 02: continued + var x = ComeAgain.zipfel; // /// 03: continued + var x = ComeAgain.zipfel; // /// 04: continued + var x = ComeAgain.zipfel; // /// 05: continued + var x = ComeAgain.zipfel; // /// 06: continued + var x = Numbers.four; // /// 07: continued + var x = topLevelFunction.bla; // /// 09: continued + var x = C.bla; // /// 10: continued + var x = zzTop.Frank; // /// 11: continued - var x = new Rainbow(); // //# 20: continued - var x = new Rainbow(); // //# 21: continued - var x = new Rainbow(); // //# 22: continued + var x = new Rainbow(); // /// 20: continued + var x = new Rainbow(); // /// 21: continued + var x = new Rainbow(); // /// 22: continued // It is a compile-time error to explicitly instantiate an enum instance. - var x = new Color(); // //# 30: compile-time error + var x = new Color(); // /// 30: compile-time error } diff --git a/tests/language_strong/error_stacktrace_test.dart b/tests/language_strong/error_stacktrace_test.dart index 9cb7f5a6130..90eb3f3af33 100644 --- a/tests/language_strong/error_stacktrace_test.dart +++ b/tests/language_strong/error_stacktrace_test.dart @@ -85,7 +85,7 @@ class Helper3 { try { // There should be no stackTrace in this normal exception object. // We should get a NoSuchMethodError. - var trace = e.stackTrace; //# static type warning + var trace = e.stackTrace; /// static type warning } on NoSuchMethodError catch (e) { Expect.isNotNull(e.stackTrace, "Error needs a stackTrace on throw"); } diff --git a/tests/language_strong/export_private_test.dart b/tests/language_strong/export_private_test.dart index 2828f4534a8..c617ceca5a1 100644 --- a/tests/language_strong/export_private_test.dart +++ b/tests/language_strong/export_private_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // Check that private dart:_ libraries cannot be imported. -export "dart:_internal"; // //# 01: compile-time error +export "dart:_internal"; // /// 01: compile-time error main() { print("Done."); diff --git a/tests/language_strong/external_test.dart b/tests/language_strong/external_test.dart index 01c71423e93..1afe6a547cf 100644 --- a/tests/language_strong/external_test.dart +++ b/tests/language_strong/external_test.dart @@ -12,26 +12,26 @@ class Foo { Foo() : x = 0; - external var x01; // //# 01: compile-time error - external int x02; // //# 02: compile-time error + external var x01; // /// 01: compile-time error + external int x02; // /// 02: compile-time error - external f10(); // //# 10: runtime error - external f11() { } // //# 11: compile-time error - external f12() => 1; // //# 12: compile-time error - external static f13(); // //# 13: runtime error - static external f14(); // //# 14: compile-time error - int external f16(); // //# 16: compile-time error + external f10(); // /// 10: runtime error + external f11() { } // /// 11: compile-time error + external f12() => 1; // /// 12: compile-time error + external static f13(); // /// 13: runtime error + static external f14(); // /// 14: compile-time error + int external f16(); // /// 16: compile-time error - external Foo.n20(val); // //# 20: runtime error - external Foo.n21(val) : x = 1; // //# 21: compile-time error - external Foo.n22(val) { x = 1; } // //# 22: compile-time error - external factory Foo.n23(val) => new Foo(); // //# 23: compile-time error - external Foo.n24(this.x); // //# 24: compile-time error - external factory Foo.n25(val) = Bar; // //# 25: compile-time error + external Foo.n20(val); // /// 20: runtime error + external Foo.n21(val) : x = 1; // /// 21: compile-time error + external Foo.n22(val) { x = 1; } // /// 22: compile-time error + external factory Foo.n23(val) => new Foo(); // /// 23: compile-time error + external Foo.n24(this.x); // /// 24: compile-time error + external factory Foo.n25(val) = Bar; // /// 25: compile-time error } -external int t06(int i) { } // //# 30: compile-time error -external int t07(int i) => i + 1; // //# 31: compile-time error +external int t06(int i) { } // /// 30: compile-time error +external int t07(int i) => i + 1; // /// 31: compile-time error main() { @@ -39,21 +39,21 @@ main() { var foo = new Foo(); // Try calling an unpatched external function. - new Foo().f10(); // //# 10: continued - new Foo().f11(); // //# 11: continued - new Foo().f12(); // //# 12: continued - Foo.f13(); // //# 13: continued - Foo.f14(); // //# 14: continued - new Foo().f16(); // //# 16: continued + new Foo().f10(); // /// 10: continued + new Foo().f11(); // /// 11: continued + new Foo().f12(); // /// 12: continued + Foo.f13(); // /// 13: continued + Foo.f14(); // /// 14: continued + new Foo().f16(); // /// 16: continued // Try calling an unpatched external constructor. - new Foo.n20(1); // //# 20: continued - new Foo.n21(1); // //# 21: continued - new Foo.n22(1); // //# 22: continued - new Foo.n23(1); // //# 23: continued - new Foo.n24(1); // //# 24: continued - new Foo.n25(1); // //# 25: continued + new Foo.n20(1); // /// 20: continued + new Foo.n21(1); // /// 21: continued + new Foo.n22(1); // /// 22: continued + new Foo.n23(1); // /// 23: continued + new Foo.n24(1); // /// 24: continued + new Foo.n25(1); // /// 25: continued - t06(1); // //# 30: continued - t07(1); // //# 31: continued + t06(1); // /// 30: continued + t07(1); // /// 31: continued } diff --git a/tests/language_strong/f_bounded_quantification_test.dart b/tests/language_strong/f_bounded_quantification_test.dart index 8f912dbb20d..b284ee31dac 100644 --- a/tests/language_strong/f_bounded_quantification_test.dart +++ b/tests/language_strong/f_bounded_quantification_test.dart @@ -32,22 +32,22 @@ main() { { bool got_type_error = false; try { - FBound fsb = new FBound(); // //# 01: static type warning + FBound fsb = new FBound(); // /// 01: static type warning } on TypeError catch (error) { got_type_error = true; } // Type error in checked mode only. - Expect.isTrue(got_type_error == isCheckedMode()); // //# 01: continued + Expect.isTrue(got_type_error == isCheckedMode()); // /// 01: continued } FBound> fbb = new FBound>(); { bool got_type_error = false; try { - FBound> fsb = new FBound>(); // //# 02: static type warning + FBound> fsb = new FBound>(); // /// 02: static type warning } on TypeError catch (error) { got_type_error = true; } // Type error in checked mode only. - Expect.isTrue(got_type_error == isCheckedMode()); // //# 02: continued + Expect.isTrue(got_type_error == isCheckedMode()); // /// 02: continued } } diff --git a/tests/language_strong/factory1_test.dart b/tests/language_strong/factory1_test.dart index bb175048239..569f89ddfa2 100644 --- a/tests/language_strong/factory1_test.dart +++ b/tests/language_strong/factory1_test.dart @@ -20,7 +20,7 @@ class B extends A { main() { new A.factory(); - new A.factory(); // //# 00: dynamic type error + new A.factory(); // /// 00: dynamic type error new B.factory(); - new B.factory(); // //# 01: dynamic type error + new B.factory(); // /// 01: dynamic type error } diff --git a/tests/language_strong/factory2_test.dart b/tests/language_strong/factory2_test.dart index 85985a4174d..963d8384943 100644 --- a/tests/language_strong/factory2_test.dart +++ b/tests/language_strong/factory2_test.dart @@ -6,7 +6,7 @@ import "dart:collection"; abstract class Link extends IterableBase { // does not match constructor for LinkFactory - factory Link(T head, [Link tail]) = LinkFactory; //# static type warning + factory Link(T head, [Link tail]) = LinkFactory; /// static type warning Link prepend(T element); } @@ -39,14 +39,14 @@ class LinkEntry extends AbstractLink { class Fisk { // instantiation of abstract class - Link nodes = const EmptyLink(); // //# static type warning + Link nodes = const EmptyLink(); // /// static type warning } main() { new Fisk(); // instantiation of abstract class - new EmptyLink().prepend('hest'); //# static type warning + new EmptyLink().prepend('hest'); /// static type warning // instantiation of abstract class - const EmptyLink().prepend('fisk'); //# static type warning + const EmptyLink().prepend('fisk'); /// static type warning } diff --git a/tests/language_strong/factory5_test.dart b/tests/language_strong/factory5_test.dart index fe44f1cca41..eb196229b0b 100644 --- a/tests/language_strong/factory5_test.dart +++ b/tests/language_strong/factory5_test.dart @@ -8,7 +8,7 @@ abstract class Link { class LinkFactory { factory LinkFactory.create() { return null; } - factory LinkFactory.Foo() = Foo; // //# 00: static type warning + factory LinkFactory.Foo() = Foo; // /// 00: static type warning } main() { diff --git a/tests/language_strong/factory_implementation_test.dart b/tests/language_strong/factory_implementation_test.dart index dc1faad04fa..f8aaadbb95e 100644 --- a/tests/language_strong/factory_implementation_test.dart +++ b/tests/language_strong/factory_implementation_test.dart @@ -36,8 +36,8 @@ main() { Expect.equals(1, a.x); Expect.equals(2, a.y); - var x = new X(11, 22); // //# 00: dynamic type error + var x = new X(11, 22); // /// 00: dynamic type error // Check that factory is invoked. - Expect.equals(110, x.x); // //# 00: continued - Expect.equals(220, x.y); // //# 00: continued + Expect.equals(110, x.x); // /// 00: continued + Expect.equals(220, x.y); // /// 00: continued } diff --git a/tests/language_strong/factory_redirection2_test.dart b/tests/language_strong/factory_redirection2_test.dart index 775ac2e9b95..0884930e41f 100644 --- a/tests/language_strong/factory_redirection2_test.dart +++ b/tests/language_strong/factory_redirection2_test.dart @@ -9,7 +9,7 @@ import "package:expect/expect.dart"; class Foo { Foo() - = Bar //# 01: compile-time error + = Bar /// 01: compile-time error ; } diff --git a/tests/language_strong/factory_redirection3_cyclic_test.dart b/tests/language_strong/factory_redirection3_cyclic_test.dart index acd564e166f..46629118fa4 100644 --- a/tests/language_strong/factory_redirection3_cyclic_test.dart +++ b/tests/language_strong/factory_redirection3_cyclic_test.dart @@ -15,7 +15,7 @@ class B implements A { class C implements B { factory C.bar() = C.foo; factory C.foo() = C - .bar //# 01: compile-time error + .bar /// 01: compile-time error ; C(); } diff --git a/tests/language_strong/factory_redirection_test.dart b/tests/language_strong/factory_redirection_test.dart index e359dd6748b..62fee859d51 100644 --- a/tests/language_strong/factory_redirection_test.dart +++ b/tests/language_strong/factory_redirection_test.dart @@ -13,13 +13,13 @@ class A { return new B(); } - factory A.test01() = T; // //# 01: runtime error + factory A.test01() = T; // /// 01: runtime error - factory A.test02() = dynamic; // //# 02: runtime error + factory A.test02() = dynamic; // /// 02: runtime error - factory A.test03() = Undefined; // //# 03: runtime error + factory A.test03() = Undefined; // /// 03: runtime error - factory A.test04() = C.test04; // //# 04: compile-time error + factory A.test04() = C.test04; // /// 04: compile-time error final T x; } @@ -33,11 +33,11 @@ class B extends A { factory B.A_factory() = A.factory; - factory B.test04() = A.test04; // //# 04: continued + factory B.test04() = A.test04; // /// 04: continued - factory B.test05(int incompatible) = A.factory; // //# 05: runtime error + factory B.test05(int incompatible) = A.factory; // /// 05: runtime error - factory B.test05(int incompatible) = A.factory; // //# 06: runtime error + factory B.test05(int incompatible) = A.factory; // /// 06: runtime error } class C extends B { @@ -49,29 +49,29 @@ class C extends B { const factory C.B_constant(V x) = B.A_constant; - factory C.test04() = B.test04; // //# 04: continued + factory C.test04() = B.test04; // /// 04: continued - factory C.test06(int incompatible) = B.test05; // //# 06: continued + factory C.test06(int incompatible) = B.test05; // /// 06: continued - const factory C.test07(V x) = B.A; // //# 07: compile-time error + const factory C.test07(V x) = B.A; // /// 07: compile-time error } main() { - new A.test01(); // //# 01: continued - new A.test02(); // //# 02: continued - new A.test03(); // //# 03: continued - new C.test04(); // //# 04: continued - new B.test05(0); // //# 05: continued - new C.test06(0); // //# 06: continued - new C.test07(0); // //# 07: continued + new A.test01(); // /// 01: continued + new A.test02(); // /// 02: continued + new A.test03(); // /// 03: continued + new C.test04(); // /// 04: continued + new B.test05(0); // /// 05: continued + new C.test06(0); // /// 06: continued + new C.test07(0); // /// 07: continued Expect.isTrue(new A() is A); Expect.isTrue(new A.constant(true).x); Expect.isTrue(new A.factory() is B); - Expect.isTrue(new B.A() is A); // //# 08: dynamic type error - Expect.isFalse(new B.A() is A); // //# 09: dynamic type error - Expect.isTrue(new B.A_constant(true).x); // //# 10: dynamic type error - Expect.isTrue(new B.A_factory() is B); // //# 11: dynamic type error - Expect.isTrue(new C.A() is A); // //# 12: dynamic type error - Expect.isTrue(new C.A_factory() is B); // //# 13: dynamic type error - Expect.isTrue(new C.B_constant(true).x); // //# 14: dynamic type error + Expect.isTrue(new B.A() is A); // /// 08: dynamic type error + Expect.isFalse(new B.A() is A); // /// 09: dynamic type error + Expect.isTrue(new B.A_constant(true).x); // /// 10: dynamic type error + Expect.isTrue(new B.A_factory() is B); // /// 11: dynamic type error + Expect.isTrue(new C.A() is A); // /// 12: dynamic type error + Expect.isTrue(new C.A_factory() is B); // /// 13: dynamic type error + Expect.isTrue(new C.B_constant(true).x); // /// 14: dynamic type error } diff --git a/tests/language_strong/fauxverride_test.dart b/tests/language_strong/fauxverride_test.dart index 45e7d64dc4b..4bc2d36a4fb 100644 --- a/tests/language_strong/fauxverride_test.dart +++ b/tests/language_strong/fauxverride_test.dart @@ -68,7 +68,7 @@ class Sub extends Super { // According to 7.1, instance methods include those of the // superclass, and according to 7, it is a compile-time to have an // instance method and static method with the same name. - static //# 03: compile-time error + static /// 03: compile-time error instanceMethod() => m(); // According to 7.7, static variables are not inherited. @@ -79,7 +79,7 @@ class Sub extends Super { // instance method and static method with the same // name. Furthermore, according to 7.7 a static variable induces an // implicit getter function (a static method). - static var instanceMethod2; //# 05: compile-time error + static var instanceMethod2; /// 05: compile-time error foo() => 'foo'; } diff --git a/tests/language_strong/field_decl_missing_var_type_test.dart b/tests/language_strong/field_decl_missing_var_type_test.dart index d6e004fe78f..7b659f96ae1 100644 --- a/tests/language_strong/field_decl_missing_var_type_test.dart +++ b/tests/language_strong/field_decl_missing_var_type_test.dart @@ -7,9 +7,9 @@ // generate a compile-time error. class A { - _this; // //# 01: compile-time error - A(x) : this._this = x; // //# 01: continued + _this; // /// 01: compile-time error + A(x) : this._this = x; // /// 01: continued } main() { - new A(0); // //# 01: continued + new A(0); // /// 01: continued } diff --git a/tests/language_strong/field_override3_test.dart b/tests/language_strong/field_override3_test.dart index 9b100be75b7..a5dbe7211ee 100644 --- a/tests/language_strong/field_override3_test.dart +++ b/tests/language_strong/field_override3_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: compile-time error + var foo = 42; // /// 00: compile-time error + get foo => 42; // /// 01: compile-time error + foo() => 42; // /// 02: compile-time error + set foo(value) { } // /// 03: compile-time error } class B extends A { diff --git a/tests/language_strong/field_override4_test.dart b/tests/language_strong/field_override4_test.dart index 69c3b56e9d7..6ffd170e8f6 100644 --- a/tests/language_strong/field_override4_test.dart +++ b/tests/language_strong/field_override4_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: ok - get foo => 42; // //# 01: ok - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: ok + var foo = 42; // /// 00: ok + get foo => 42; // /// 01: ok + foo() => 42; // /// 02: compile-time error + set foo(value) { } // /// 03: ok } class B extends A { diff --git a/tests/language_strong/field_override_test.dart b/tests/language_strong/field_override_test.dart index 4c6e96f2487..c298a83cd59 100644 --- a/tests/language_strong/field_override_test.dart +++ b/tests/language_strong/field_override_test.dart @@ -26,13 +26,13 @@ class SubSub extends Super { SubSub() : super(); // B2 not assignable to B1 - B2 field; // //# 01: static type warning + B2 field; // /// 01: static type warning } main() { SubSub val1 = new SubSub(); - val1.field = new B2(); //# 02: static type warning, dynamic type error - Expect.equals(true, val1.field is B2); //# 02: continued + val1.field = new B2(); /// 02: static type warning, dynamic type error + Expect.equals(true, val1.field is B2); /// 02: continued Sub val2 = new Sub(); val2.field = new A(); diff --git a/tests/language_strong/field_type_check2_test.dart b/tests/language_strong/field_type_check2_test.dart index 8fa875217a5..80925f4f7d4 100644 --- a/tests/language_strong/field_type_check2_test.dart +++ b/tests/language_strong/field_type_check2_test.dart @@ -6,7 +6,7 @@ class A { A a; bar(c) { - c.a = 2; //# 01: dynamic type error + c.a = 2; /// 01: dynamic type error } } @@ -15,6 +15,6 @@ class B { } main() { - new A().bar(new A()); //# 01: continued + new A().bar(new A()); /// 01: continued new A().bar(new B()); } diff --git a/tests/language_strong/field_type_check_test.dart b/tests/language_strong/field_type_check_test.dart index f1c3d436a0a..0a6fe3682e7 100644 --- a/tests/language_strong/field_type_check_test.dart +++ b/tests/language_strong/field_type_check_test.dart @@ -7,5 +7,5 @@ class A { } int main() { - new A().e = "String"; //# 01: static type warning, dynamic type error + new A().e = "String"; /// 01: static type warning, dynamic type error } diff --git a/tests/language_strong/final_for_in_variable_test.dart b/tests/language_strong/final_for_in_variable_test.dart index 8649aef5a43..c6575793c29 100644 --- a/tests/language_strong/final_for_in_variable_test.dart +++ b/tests/language_strong/final_for_in_variable_test.dart @@ -4,6 +4,6 @@ main() { for (final i in [1, 2, 3]) { - i = 4; //# 01: static type warning, runtime error + i = 4; /// 01: static type warning, runtime error } } diff --git a/tests/language_strong/final_is_not_const_test.dart b/tests/language_strong/final_is_not_const_test.dart index 433d4d06c27..bc92d365a82 100644 --- a/tests/language_strong/final_is_not_const_test.dart +++ b/tests/language_strong/final_is_not_const_test.dart @@ -5,9 +5,9 @@ import "package:expect/expect.dart"; final F0 = 42; -const C0 = F0; // //# 01: compile-time error +const C0 = F0; // /// 01: compile-time error main() { Expect.equals(42, F0); - Expect.equals(42, C0); // //# 01: continued + Expect.equals(42, C0); // /// 01: continued } diff --git a/tests/language_strong/final_param_test.dart b/tests/language_strong/final_param_test.dart index e9cdda1dd12..56b02d9b7a8 100644 --- a/tests/language_strong/final_param_test.dart +++ b/tests/language_strong/final_param_test.dart @@ -5,7 +5,7 @@ class A { static void test(final x) { - x = 2; // //# 01: static type warning, runtime error + x = 2; // /// 01: static type warning, runtime error } } diff --git a/tests/language_strong/final_super_field_set_test.dart b/tests/language_strong/final_super_field_set_test.dart index 36e9f89bbce..9c3289bb1f9 100644 --- a/tests/language_strong/final_super_field_set_test.dart +++ b/tests/language_strong/final_super_field_set_test.dart @@ -11,10 +11,10 @@ class SuperClass { class Class extends SuperClass { m() { - super.field = 87; //# 01: static type warning + super.field = 87; /// 01: static type warning } } main() { - new Class().m(); //# 01: continued + new Class().m(); /// 01: continued } \ No newline at end of file diff --git a/tests/language_strong/final_syntax_test.dart b/tests/language_strong/final_syntax_test.dart index bf6f97579a1..85c92e78cd9 100644 --- a/tests/language_strong/final_syntax_test.dart +++ b/tests/language_strong/final_syntax_test.dart @@ -6,16 +6,16 @@ import "package:expect/expect.dart"; main() { final f0 = 42; - final f1; //# 01: compile-time error + final f1; /// 01: compile-time error final int f2 = 87; - final int f3; //# 02: compile-time error + final int f3; /// 02: compile-time error Expect.equals(42, f0); Expect.equals(87, f2); Expect.equals(42, F0); - Expect.equals(null, F1); //# 03: compile-time error + Expect.equals(null, F1); /// 03: compile-time error Expect.equals(87, F2); - Expect.equals(null, F3); //# 04: compile-time error + Expect.equals(null, F3); /// 04: compile-time error Expect.isTrue(P0 is Point); Expect.isTrue(P1 is int); @@ -24,20 +24,20 @@ main() { Expect.isTrue(A0 is int); Expect.isTrue(A1 is int); - Expect.isTrue(A2 is int); //# 08: runtime error - Expect.isTrue(A3 is int); //# 08: continued + Expect.isTrue(A2 is int); /// 08: runtime error + Expect.isTrue(A3 is int); /// 08: continued Expect.isTrue(C0.X is C1); - Expect.isTrue(C0.X.x is C1); //# 09: compile-time error + Expect.isTrue(C0.X.x is C1); /// 09: compile-time error Expect.equals("Hello 42", B2); - Expect.equals("42Hello", B3); //# 10: runtime error + Expect.equals("42Hello", B3); /// 10: runtime error } final F0 = 42; -final F1; // //# 03: continued +final F1; // /// 03: continued final int F2 = 87; -final int F3; // //# 04: continued +final int F3; // /// 04: continued class Point { final x, y; @@ -56,8 +56,8 @@ final P3 = new Point(0, 0) + 1; // expressions. final A0 = 42; final A1 = A0 + 1; -final A2 = A3 + 1; //# 08: continued -final A3 = A2 + 1; //# 08: continued +final A2 = A3 + 1; /// 08: continued +final A3 = A2 + 1; /// 08: continued class C0 { static final X = const C1(); @@ -65,7 +65,7 @@ class C0 { class C1 { const C1() - : x = C0.X //# 09: continued + : x = C0.X /// 09: continued ; final x = null; } @@ -74,4 +74,4 @@ class C1 { final B0 = 42; final B1 = "Hello"; final B2 = "$B1 $B0"; -final B3 = B0 + B1; //# 10: continued +final B3 = B0 + B1; /// 10: continued diff --git a/tests/language_strong/final_variable_assignment_test.dart b/tests/language_strong/final_variable_assignment_test.dart index 59c275a5236..1a6df0b21ea 100644 --- a/tests/language_strong/final_variable_assignment_test.dart +++ b/tests/language_strong/final_variable_assignment_test.dart @@ -6,8 +6,8 @@ main() { final x = 30; - x = 0; // //# 01: static type warning, runtime error - x += 1; // //# 02: static type warning, runtime error - ++x; // //# 03: static type warning, runtime error - x++; // //# 04: static type warning, runtime error + x = 0; // /// 01: static type warning, runtime error + x += 1; // /// 02: static type warning, runtime error + ++x; // /// 03: static type warning, runtime error + x++; // /// 04: static type warning, runtime error } diff --git a/tests/language_strong/first_class_types_literals_test.dart b/tests/language_strong/first_class_types_literals_test.dart index 0375245f82d..9a03628eb58 100644 --- a/tests/language_strong/first_class_types_literals_test.dart +++ b/tests/language_strong/first_class_types_literals_test.dart @@ -41,23 +41,23 @@ main() { Expect.equals(String, 'hest'.runtimeType); Expect.equals(double, (0.5).runtimeType); Expect.equals(bool, true.runtimeType); - Expect.equals(C, new C().runtimeType); // //# 01: ok - Expect.equals(D, new D().runtimeType); // //# 02: ok + Expect.equals(C, new C().runtimeType); // /// 01: ok + Expect.equals(D, new D().runtimeType); // /// 02: ok // runtimeType on type is idempotent. Expect.equals((D).runtimeType, (D).runtimeType.runtimeType); // Test that operator calls on class literals go to Type. - Expect.throws(() => C = 1, (e) => e is NoSuchMethodError); //# 03: static type warning - Expect.throws(() => C++, (e) => e is NoSuchMethodError); //# 04: static type warning - Expect.throws(() => C + 1, (e) => e is NoSuchMethodError); //# 05: static type warning - Expect.throws(() => C[2], (e) => e is NoSuchMethodError); //# 06: static type warning - Expect.throws(() => C[2] = 'hest', (e) => e is NoSuchMethodError); //# 07: static type warning - Expect.throws(() => dynamic = 1, (e) => e is NoSuchMethodError); //# 08: static type warning - Expect.throws(() => dynamic++, (e) => e is NoSuchMethodError); //# 09: static type warning - Expect.throws(() => dynamic + 1, (e) => e is NoSuchMethodError); //# 10: static type warning - Expect.throws(() => dynamic[2], (e) => e is NoSuchMethodError); //# 11: static type warning - Expect.throws(() => dynamic[2] = 'hest', (e) => e is NoSuchMethodError); //# 12: static type warning + Expect.throws(() => C = 1, (e) => e is NoSuchMethodError); /// 03: static type warning + Expect.throws(() => C++, (e) => e is NoSuchMethodError); /// 04: static type warning + Expect.throws(() => C + 1, (e) => e is NoSuchMethodError); /// 05: static type warning + Expect.throws(() => C[2], (e) => e is NoSuchMethodError); /// 06: static type warning + Expect.throws(() => C[2] = 'hest', (e) => e is NoSuchMethodError); /// 07: static type warning + Expect.throws(() => dynamic = 1, (e) => e is NoSuchMethodError); /// 08: static type warning + Expect.throws(() => dynamic++, (e) => e is NoSuchMethodError); /// 09: static type warning + Expect.throws(() => dynamic + 1, (e) => e is NoSuchMethodError); /// 10: static type warning + Expect.throws(() => dynamic[2], (e) => e is NoSuchMethodError); /// 11: static type warning + Expect.throws(() => dynamic[2] = 'hest', (e) => e is NoSuchMethodError); /// 12: static type warning Expect.equals((dynamic).toString(), 'dynamic'); } diff --git a/tests/language_strong/fixed_type_variable2_test.dart b/tests/language_strong/fixed_type_variable2_test.dart index 8f71a4ef722..157fae34320 100644 --- a/tests/language_strong/fixed_type_variable2_test.dart +++ b/tests/language_strong/fixed_type_variable2_test.dart @@ -32,12 +32,12 @@ class IntC extends C { } void main() { - testA(); //# 01: ok - testNumA(); //# 02: ok - testB(); //# 03: ok - testStringB(); //# 04: ok - testC(); //# 05: ok - testIntC(); //# 06: ok + testA(); /// 01: ok + testNumA(); /// 02: ok + testB(); /// 03: ok + testStringB(); /// 04: ok + testC(); /// 05: ok + testIntC(); /// 06: ok } void testA() { diff --git a/tests/language_strong/fixed_type_variable_test.dart b/tests/language_strong/fixed_type_variable_test.dart index ddfecdfec4e..e032fafc474 100644 --- a/tests/language_strong/fixed_type_variable_test.dart +++ b/tests/language_strong/fixed_type_variable_test.dart @@ -32,12 +32,12 @@ class IntC extends C { } void main() { - testA(); //# 01: ok - testNumA(); //# 02: ok - testB(); //# 03: ok - testStringB(); //# 04: ok - testC(); //# 05: ok - testIntC(); //# 06: ok + testA(); /// 01: ok + testNumA(); /// 02: ok + testB(); /// 03: ok + testStringB(); /// 04: ok + testC(); /// 05: ok + testIntC(); /// 06: ok } void testA() { diff --git a/tests/language_strong/flatten_test.dart b/tests/language_strong/flatten_test.dart index ab2cc0679a8..dcf2d61a8e6 100644 --- a/tests/language_strong/flatten_test.dart +++ b/tests/language_strong/flatten_test.dart @@ -23,25 +23,25 @@ class Divergent implements Future>> { test() async { // flatten(Derived) = int - int x = await new Derived(); //# 01: runtime error - Future f() async => new Derived(); //# 02: ok - Future f() async { return new Derived(); } //# 03: ok - Future x = (() async => new Derived())(); //# 04: runtime error + int x = await new Derived(); /// 01: runtime error + Future f() async => new Derived(); /// 02: ok + Future f() async { return new Derived(); } /// 03: ok + Future x = (() async => new Derived())(); /// 04: runtime error // TODO(vsm): Restore when https://github.com/dart-lang/sdk/issues/25611 // is fixed. /* // flatten(FixedPoint) = FixedPoint - FixedPoint x = await new FixedPoint(); //# 05: runtime error - Future> f() async => new FixedPoint(); //# 06: ok - Future> f() async { return new FixedPoint(); } //# 07: ok - Future> x = (() async => new FixedPoint())(); //# 08: runtime error + FixedPoint x = await new FixedPoint(); /// 05: runtime error + Future> f() async => new FixedPoint(); /// 06: ok + Future> f() async { return new FixedPoint(); } /// 07: ok + Future> x = (() async => new FixedPoint())(); /// 08: runtime error // flatten(Divergent) = Divergent> - Divergent> x = await new Divergent(); //# 09: runtime error - Future>> f() async => new Divergent(); //# 10: ok - Future>> f() async { return new Divergent(); } //# 11: ok - Future>> x = (() async => new Divergent())(); //# 12: runtime error + Divergent> x = await new Divergent(); /// 09: runtime error + Future>> f() async => new Divergent(); /// 10: ok + Future>> f() async { return new Divergent(); } /// 11: ok + Future>> x = (() async => new Divergent())(); /// 12: runtime error */ } diff --git a/tests/language_strong/function_syntax_test.dart b/tests/language_strong/function_syntax_test.dart index fc9d92568d0..ff96445a07c 100644 --- a/tests/language_strong/function_syntax_test.dart +++ b/tests/language_strong/function_syntax_test.dart @@ -9,9 +9,9 @@ import "package:expect/expect.dart"; class FunctionSyntaxTest { static void testMain -/* //# 00: compile-time error +/* /// 00: compile-time error () -*/ //# 00: continued +*/ /// 00: continued { testNestedFunctions(); testFunctionExpressions(); @@ -23,25 +23,25 @@ class FunctionSyntaxTest { } static void testNestedFunctions -/* //# 01: compile-time error +/* /// 01: compile-time error () -*/ //# 01: continued +*/ /// 01: continued { // No types - braces. nb0 -/* //# 02: compile-time error +/* /// 02: compile-time error () -*/ //# 02: continued +*/ /// 02: continued { return 42; } nb1 -/* //# 03: compile-time error +/* /// 03: compile-time error (a) -*/ //# 03: continued +*/ /// 03: continued { return a; } nb2 -/* //# 04: compile-time error +/* /// 04: compile-time error (a, b) -*/ //# 04: continued +*/ /// 04: continued { return a + b; } Expect.equals(42, nb0()); Expect.equals(87, nb1(87)); @@ -49,19 +49,19 @@ class FunctionSyntaxTest { // No types - arrows. na0 -/* //# 05: compile-time error +/* /// 05: compile-time error () -*/ //# 05: continued +*/ /// 05: continued => 42; na1 -/* //# 06: compile-time error +/* /// 06: compile-time error (a) -*/ //# 06: continued +*/ /// 06: continued => a; na2 -/* //# 07: compile-time error +/* /// 07: compile-time error (a, b) -*/ //# 07: continued +*/ /// 07: continued => a + b; Expect.equals(42, na0()); Expect.equals(87, na1(87)); @@ -69,19 +69,19 @@ class FunctionSyntaxTest { // Return type - braces. int rb0 -/* //# 08: compile-time error +/* /// 08: compile-time error () -*/ //# 08: continued +*/ /// 08: continued { return 42; } int rb1 -/* //# 09: compile-time error +/* /// 09: compile-time error (a) -*/ //# 09: continued +*/ /// 09: continued { return a; } int rb2 -/* //# 10: compile-time error +/* /// 10: compile-time error (a, b) -*/ //# 10: continued +*/ /// 10: continued { return a + b; } Expect.equals(42, rb0()); Expect.equals(87, rb1(87)); @@ -89,19 +89,19 @@ class FunctionSyntaxTest { // Return type - arrows. int ra0 -/* //# 11: compile-time error +/* /// 11: compile-time error () -*/ //# 11: continued +*/ /// 11: continued => 42; int ra1 -/* //# 12: compile-time error +/* /// 12: compile-time error (a) -*/ //# 12: continued +*/ /// 12: continued => a; int ra2 -/* //# 13: compile-time error +/* /// 13: compile-time error (a, b) -*/ //# 13: continued +*/ /// 13: continued => a + b; Expect.equals(42, ra0()); Expect.equals(87, ra1(87)); @@ -109,14 +109,14 @@ class FunctionSyntaxTest { // Fully typed - braces. int fb1 -/* //# 14: compile-time error +/* /// 14: compile-time error (int a) -*/ //# 14: continued +*/ /// 14: continued { return a; } int fb2 -/* //# 15: compile-time error +/* /// 15: compile-time error (int a, int b) -*/ //# 15: continued +*/ /// 15: continued { return a + b; } Expect.equals(42, rb0()); Expect.equals(87, rb1(87)); @@ -124,14 +124,14 @@ class FunctionSyntaxTest { // Fully typed - arrows. int fa1 -/* //# 16: compile-time error +/* /// 16: compile-time error (int a) -*/ //# 16: continued +*/ /// 16: continued => a; int fa2 -/* //# 17: compile-time error +/* /// 17: compile-time error (int a, int b) -*/ //# 17: continued +*/ /// 17: continued => a + b; Expect.equals(42, ra0()); Expect.equals(87, ra1(87)); @@ -139,193 +139,193 @@ class FunctionSyntaxTest { // Generic types - braces. List gb0 -/* //# 18: compile-time error +/* /// 18: compile-time error () -*/ //# 18: continued +*/ /// 18: continued { return [42]; } List gb1 -/* //# 19: compile-time error +/* /// 19: compile-time error (List a) -*/ //# 19: continued +*/ /// 19: continued { return a; } Expect.equals(42, gb0()[0]); Expect.equals(87, gb1([87])[0]); // Generic types - arrows. List ga0 -/* //# 20: compile-time error +/* /// 20: compile-time error () -*/ //# 20: continued +*/ /// 20: continued => [42]; List ga1 -/* //# 21: compile-time error +/* /// 21: compile-time error (List a) -*/ //# 21: continued +*/ /// 21: continued => a; Expect.equals(42, ga0()[0]); Expect.equals(87, ga1([87])[0]); } static void testFunctionExpressions -/* //# 22: compile-time error +/* /// 22: compile-time error () -*/ //# 22: continued +*/ /// 22: continued { eval0 -/* //# 23: compile-time error +/* /// 23: compile-time error (fn) -*/ //# 23: continued +*/ /// 23: continued => fn(); eval1 -/* //# 24: compile-time error +/* /// 24: compile-time error (fn, a) -*/ //# 24: continued +*/ /// 24: continued => fn(a); eval2 -/* //# 25: compile-time error +/* /// 25: compile-time error (fn, a, b) -*/ //# 25: continued +*/ /// 25: continued => fn(a, b); // No types - braces. Expect.equals(42, eval0( -/* //# 26: compile-time error +/* /// 26: compile-time error () -*/ //# 26: continued +*/ /// 26: continued { return 42; })); Expect.equals(87, eval1( -/* //# 27: compile-time error +/* /// 27: compile-time error (a) -*/ //# 27: continued +*/ /// 27: continued { return a; }, 87)); Expect.equals(1 + 2, eval2( -/* //# 28: compile-time error +/* /// 28: compile-time error (a, b) -*/ //# 28: continued +*/ /// 28: continued { return a + b; }, 1, 2)); Expect.equals(42, eval0( -/* //# 29: compile-time error +/* /// 29: compile-time error () -*/ //# 29: continued +*/ /// 29: continued { return 42; })); Expect.equals(87, eval1( -/* //# 30: compile-time error +/* /// 30: compile-time error (a) -*/ //# 30: continued +*/ /// 30: continued { return a; }, 87)); Expect.equals(1 + 2, eval2( -/* //# 31: compile-time error +/* /// 31: compile-time error (a, b) -*/ //# 31: continued +*/ /// 31: continued { return a + b; }, 1, 2)); // No types - arrows. Expect.equals(42, eval0( -/* //# 32: compile-time error +/* /// 32: compile-time error () -*/ //# 32: continued +*/ /// 32: continued => 42)); Expect.equals(87, eval1( -/* //# 33: compile-time error +/* /// 33: compile-time error (a) -*/ //# 33: continued +*/ /// 33: continued => a, 87)); Expect.equals(1 + 2, eval2( -/* //# 34: compile-time error +/* /// 34: compile-time error (a, b) -*/ //# 34: continued +*/ /// 34: continued => a + b, 1, 2)); Expect.equals(42, eval0( -/* //# 35: compile-time error +/* /// 35: compile-time error () -*/ //# 35: continued +*/ /// 35: continued => 42)); Expect.equals(87, eval1( -/* //# 36: compile-time error +/* /// 36: compile-time error (a) -*/ //# 36: continued +*/ /// 36: continued => a, 87)); Expect.equals(1 + 2, eval2( -/* //# 37: compile-time error +/* /// 37: compile-time error (a, b) -*/ //# 37: continued +*/ /// 37: continued => a + b, 1, 2)); // Argument types - braces. Expect.equals(42, eval0( -/* //# 44: compile-time error +/* /// 44: compile-time error () -*/ //# 44: continued +*/ /// 44: continued { return 42; })); Expect.equals(87, eval1( -/* //# 45: compile-time error +/* /// 45: compile-time error (int a) -*/ //# 45: continued +*/ /// 45: continued { return a; }, 87)); Expect.equals(1 + 2, eval2( -/* //# 46: compile-time error +/* /// 46: compile-time error (int a, int b) -*/ //# 46: continued +*/ /// 46: continued { return a + b; }, 1, 2)); Expect.equals(42, eval0( -/* //# 47: compile-time error +/* /// 47: compile-time error () -*/ //# 47: continued +*/ /// 47: continued { return 42; })); Expect.equals(87, eval1( -/* //# 48: compile-time error +/* /// 48: compile-time error (int a) -*/ //# 48: continued +*/ /// 48: continued { return a; }, 87)); Expect.equals(1 + 2, eval2( -/* //# 49: compile-time error +/* /// 49: compile-time error (int a, int b) -*/ //# 49: continued +*/ /// 49: continued { return a + b; }, 1, 2)); // Argument types - arrows. Expect.equals(42, eval0( -/* //# 50: compile-time error +/* /// 50: compile-time error () -*/ //# 50: continued +*/ /// 50: continued => 42)); Expect.equals(87, eval1( -/* //# 51: compile-time error +/* /// 51: compile-time error (int a) -*/ //# 51: continued +*/ /// 51: continued => a, 87)); Expect.equals(1 + 2, eval2( -/* //# 52: compile-time error +/* /// 52: compile-time error (int a, int b) -*/ //# 52: continued +*/ /// 52: continued => a + b, 1, 2)); Expect.equals(42, eval0( -/* //# 53: compile-time error +/* /// 53: compile-time error () -*/ //# 53: continued +*/ /// 53: continued => 42)); Expect.equals(87, eval1( -/* //# 54: compile-time error +/* /// 54: compile-time error (int a) -*/ //# 54: continued +*/ /// 54: continued => a, 87)); Expect.equals(1 + 2, eval2( -/* //# 55: compile-time error +/* /// 55: compile-time error (int a, int b) -*/ //# 55: continued +*/ /// 55: continued => a + b, 1, 2)); } static void testPrecedence -/* //# 64: compile-time error +/* /// 64: compile-time error () -*/ //# 64: continued +*/ /// 64: continued { expectEvaluatesTo -/* //# 65: compile-time error +/* /// 65: compile-time error (value, fn) -*/ //# 65: continued +*/ /// 65: continued { Expect.equals(value, fn()); } // Assignment. @@ -403,9 +403,9 @@ class FunctionSyntaxTest { // Selector. fn -/* //# 66: compile-time error +/* /// 66: compile-time error () -*/ //# 66: continued +*/ /// 66: continued => 42; var list = [87]; expectEvaluatesTo(42, ()=> fn()); @@ -415,9 +415,9 @@ class FunctionSyntaxTest { } static void testInitializers -/* //# 67: compile-time error +/* /// 67: compile-time error () -*/ //# 67: continued +*/ /// 67: continued { Expect.equals(42, (new C.cb0().fn)()); Expect.equals(43, (new C.ca0().fn)()); @@ -448,9 +448,9 @@ class FunctionSyntaxTest { } static void testFunctionParameter -/* //# 68: compile-time error +/* /// 68: compile-time error () -*/ //# 68: continued +*/ /// 68: continued { f0(fn()) => fn(); Expect.equals(42, f0(()=> 42)); @@ -466,26 +466,26 @@ class FunctionSyntaxTest { } static void testFunctionIdentifierExpression -/* //# 69: compile-time error +/* /// 69: compile-time error () -*/ //# 69: continued +*/ /// 69: continued { Expect.equals(87, ( -/* //# 70: compile-time error +/* /// 70: compile-time error () -*/ //# 70: continued +*/ /// 70: continued => 87)()); } static void testFunctionIdentifierStatement -/* //# 71: compile-time error +/* /// 71: compile-time error () -*/ //# 71: continued +*/ /// 71: continued { function -/* //# 72: compile-time error +/* /// 72: compile-time error () -*/ //# 72: continued +*/ /// 72: continued => 42; Expect.equals(42, function()); Expect.equals(true, function is Function); @@ -533,9 +533,9 @@ class C { C.ra3() : fn = {'x': () => 69}['x'] { } static wrap -/* //# 73: compile-time error +/* /// 73: compile-time error (fn) -*/ //# 73: continued +*/ /// 73: continued { return fn; } final fn; @@ -543,9 +543,9 @@ class C { } main -/* //# 74: compile-time error +/* /// 74: compile-time error () -*/ //# 74: continued +*/ /// 74: continued { FunctionSyntaxTest.testMain(); } diff --git a/tests/language_strong/function_type_alias5_test.dart b/tests/language_strong/function_type_alias5_test.dart index 7f60a4ea7cd..8a3f1d33a7d 100644 --- a/tests/language_strong/function_type_alias5_test.dart +++ b/tests/language_strong/function_type_alias5_test.dart @@ -3,15 +3,15 @@ // BSD-style license that can be found in the LICENSE file. // Dart test for illegally self referencing function type alias. -typedef Handle Handle(String command); // //# 00: compile-time error +typedef Handle Handle(String command); // /// 00: compile-time error -typedef F(F x); // //# 01: compile-time error +typedef F(F x); // /// 01: compile-time error -typedef A(B x); // //# 02: compile-time error -typedef B(A x); // //# 02: continued +typedef A(B x); // /// 02: compile-time error +typedef B(A x); // /// 02: continued main() { - Handle h; // //# 00: continued - F f; // //# 01: continued - A f; // //# 02: continued + Handle h; // /// 00: continued + F f; // /// 01: continued + A f; // /// 02: continued } diff --git a/tests/language_strong/function_type_alias6_test.dart b/tests/language_strong/function_type_alias6_test.dart index 1efc22d4e45..3f89d58f387 100644 --- a/tests/language_strong/function_type_alias6_test.dart +++ b/tests/language_strong/function_type_alias6_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; typedef F(List - // //# 00: compile-time error + // /// 00: compile-time error x); typedef D C(); diff --git a/tests/language_strong/function_type_alias7_test.dart b/tests/language_strong/function_type_alias7_test.dart index dadb5878d9c..fe07e0e6a93 100644 --- a/tests/language_strong/function_type_alias7_test.dart +++ b/tests/language_strong/function_type_alias7_test.dart @@ -5,17 +5,17 @@ typedef void funcType([int arg]); -typedef void badFuncType([int arg = 0]); // //# 00: compile-time error +typedef void badFuncType([int arg = 0]); // /// 00: compile-time error -typedef void badFuncType({int arg: 0}); // //# 02: compile-time error +typedef void badFuncType({int arg: 0}); // /// 02: compile-time error class A - extends funcType // //# 01: compile-time error + extends funcType // /// 01: compile-time error { } main() { new A(); - badFuncType f; // //# 00: continued - badFuncType f; // //# 02: continued + badFuncType f; // /// 00: continued + badFuncType f; // /// 02: continued } diff --git a/tests/language_strong/function_type_alias9_test.dart b/tests/language_strong/function_type_alias9_test.dart index c865bead9e9..e0e2fdd2ff2 100644 --- a/tests/language_strong/function_type_alias9_test.dart +++ b/tests/language_strong/function_type_alias9_test.dart @@ -4,7 +4,7 @@ // Dart test for legally self referencing function type alias. typedef void F(List - // //# 00: compile-time error + // /// 00: compile-time error l); typedef void G(List l); diff --git a/tests/language_strong/function_type_call_getter2_test.dart b/tests/language_strong/function_type_call_getter2_test.dart index 3b0c4a41893..3a8660f86d4 100644 --- a/tests/language_strong/function_type_call_getter2_test.dart +++ b/tests/language_strong/function_type_call_getter2_test.dart @@ -24,26 +24,26 @@ main() { C c = new C(); final - Function // //# 00: static type warning, dynamic type error + Function // /// 00: static type warning, dynamic type error a2 = a; final - F // //# 01: static type warning, dynamic type error + F // /// 01: static type warning, dynamic type error a3 = a; final - Function // //# 02: static type warning, dynamic type error + Function // /// 02: static type warning, dynamic type error b2 = b; final - F // //# 03: static type warning, dynamic type error + F // /// 03: static type warning, dynamic type error b3 = b; final - Function // //# 04: static type warning, dynamic type error + Function // /// 04: static type warning, dynamic type error c2 = c; final - F // //# 05: static type warning, dynamic type error + F // /// 05: static type warning, dynamic type error c3 = c; } diff --git a/tests/language_strong/generic_field_mixin6_test.dart b/tests/language_strong/generic_field_mixin6_test.dart index 664246a9042..6bdb624d90c 100644 --- a/tests/language_strong/generic_field_mixin6_test.dart +++ b/tests/language_strong/generic_field_mixin6_test.dart @@ -7,7 +7,7 @@ import 'package:expect/expect.dart'; class M { - T field = 0; //# 01: static type warning + T field = 0; /// 01: static type warning } class A {} class C1 = Object with M; @@ -15,12 +15,12 @@ class C2 = Object with M; class C3 = Object with M; main() { - checkNoDynamicTypeError(() => new C1()); // //# 01: continued - checkDynamicTypeError(() => new C1()); //# 01: continued + checkNoDynamicTypeError(() => new C1()); // /// 01: continued + checkDynamicTypeError(() => new C1()); /// 01: continued - checkNoDynamicTypeError(() => new C2()); // //# 01: continued + checkNoDynamicTypeError(() => new C2()); // /// 01: continued - checkDynamicTypeError(() => new C3()); // //# 01: continued + checkDynamicTypeError(() => new C3()); // /// 01: continued } /// Returns `true` if the program is running in checked mode. diff --git a/tests/language_strong/generic_methods_bounds_test.dart b/tests/language_strong/generic_methods_bounds_test.dart index 365d0efc030..e1452ad7b44 100644 --- a/tests/language_strong/generic_methods_bounds_test.dart +++ b/tests/language_strong/generic_methods_bounds_test.dart @@ -19,8 +19,8 @@ class C { main() { C c = new C(); - c.fun(new B()); //# 01: compile-time error + c.fun(new B()); /// 01: compile-time error dynamic obj = new C(); - obj.fun(new B()); //# 02: runtime error + obj.fun(new B()); /// 02: runtime error } diff --git a/tests/language_strong/generic_methods_dynamic_test.dart b/tests/language_strong/generic_methods_dynamic_test.dart index 6b92dc3abce..2da2b656e1a 100644 --- a/tests/language_strong/generic_methods_dynamic_test.dart +++ b/tests/language_strong/generic_methods_dynamic_test.dart @@ -25,20 +25,20 @@ main() { C c = new C(); dynamic obj = c; - c.foo(b); //# 01: compile-time error - obj.foo(b); //# 02: runtime error + c.foo(b); /// 01: compile-time error + obj.foo(b); /// 02: runtime error - c.bar([new B()]); //# 03: compile-time error - obj.bar([new B()]); //# 04: runtime error + c.bar([new B()]); /// 03: compile-time error + obj.bar([new B()]); /// 04: runtime error - Expect.equals(c.foo(b), b); //# 05: ok - Expect.equals(obj.foo(b), b); //# 05: continued + Expect.equals(c.foo(b), b); /// 05: ok + Expect.equals(obj.foo(b), b); /// 05: continued - dynamic x = c.bar([new B()]); //# 05: continued - Expect.isTrue(x is List); //# 05: continued - Expect.equals(x.length, 1); //# 05: continued + dynamic x = c.bar([new B()]); /// 05: continued + Expect.isTrue(x is List); /// 05: continued + Expect.equals(x.length, 1); /// 05: continued - dynamic y = obj.bar([new B()]); //# 05: continued - Expect.isTrue(y is List); //# 05: continued - Expect.equals(y.length, 1); //# 05: continued + dynamic y = obj.bar([new B()]); /// 05: continued + Expect.isTrue(y is List); /// 05: continued + Expect.equals(y.length, 1); /// 05: continued } diff --git a/tests/language_strong/generic_methods_overriding_test.dart b/tests/language_strong/generic_methods_overriding_test.dart index 2ef1def02b8..2de07fc2576 100644 --- a/tests/language_strong/generic_methods_overriding_test.dart +++ b/tests/language_strong/generic_methods_overriding_test.dart @@ -20,13 +20,13 @@ class C { } class D extends C { - String fun(T t) => "D"; //# 01: compile-time error - String fun(T t) => "D"; //# 02: ok + String fun(T t) => "D"; /// 01: compile-time error + String fun(T t) => "D"; /// 02: ok } class E extends C { - String fun(Y y) => "E"; //# 03: compile-time error - String fun(Y y) => "E"; //# 04: ok + String fun(Y y) => "E"; /// 03: compile-time error + String fun(Y y) => "E"; /// 04: ok } class F extends C { @@ -36,8 +36,8 @@ class F extends C { String fun(T t) { if (t is Z) { - return this.foobar(t as Z); //# 05: ok - return this.foobar(t); //# 06: ok + return this.foobar(t as Z); /// 05: ok + return this.foobar(t); /// 06: ok } return "FY"; } @@ -53,10 +53,10 @@ main() { F f = new F(); Expect.equals(c.fun(y), "C"); - Expect.equals(d.fun(y), "D"); //# 02: continued - Expect.equals(e.fun(y), "E"); //# 04: continued - Expect.equals(f.fun(y), "FY"); //# 05: continued - Expect.equals(f.fun(z), "FZ"); //# 05: continued - Expect.equals(f.fun(y), "FY"); //# 06: continued - Expect.equals(f.fun(z), "FZ"); //# 06: continued + Expect.equals(d.fun(y), "D"); /// 02: continued + Expect.equals(e.fun(y), "E"); /// 04: continued + Expect.equals(f.fun(y), "FY"); /// 05: continued + Expect.equals(f.fun(z), "FZ"); /// 05: continued + Expect.equals(f.fun(y), "FY"); /// 06: continued + Expect.equals(f.fun(z), "FZ"); /// 06: continued } diff --git a/tests/language_strong/generic_methods_recursive_bound_test.dart b/tests/language_strong/generic_methods_recursive_bound_test.dart index f79ce2050e5..740d8bd4f51 100644 --- a/tests/language_strong/generic_methods_recursive_bound_test.dart +++ b/tests/language_strong/generic_methods_recursive_bound_test.dart @@ -25,11 +25,11 @@ class C implements I { } main() { - foo([new C(), new C()]); //# 01: ok + foo([new C(), new C()]); /// 01: ok dynamic bar = foo; List list2 = [4, 2]; // The type int does not extend I. - foo(list2); //# 02: compile-time error - bar(list2); //# 03: runtime error + foo(list2); /// 02: compile-time error + bar(list2); /// 03: runtime error } diff --git a/tests/language_strong/generic_methods_simple_as_expression_test.dart b/tests/language_strong/generic_methods_simple_as_expression_test.dart index d6b3c48c214..bbfa54edd79 100644 --- a/tests/language_strong/generic_methods_simple_as_expression_test.dart +++ b/tests/language_strong/generic_methods_simple_as_expression_test.dart @@ -13,6 +13,6 @@ T cast(dynamic obj) { } main() { - Expect.equals(cast(42), 42); //# 01: ok - cast(42); //# 02: runtime error + Expect.equals(cast(42), 42); /// 01: ok + cast(42); /// 02: runtime error } diff --git a/tests/language_strong/get_set_syntax_test.dart b/tests/language_strong/get_set_syntax_test.dart index 8e5db4e571a..4aa15c3a4c2 100644 --- a/tests/language_strong/get_set_syntax_test.dart +++ b/tests/language_strong/get_set_syntax_test.dart @@ -3,41 +3,41 @@ // BSD-style license that can be found in the LICENSE file. var get; -var get a; // //# 00: compile-time error -var get b, c; // //# 01: compile-time error +var get a; // /// 00: compile-time error +var get b, c; // /// 01: compile-time error var set; -var set d; // //# 02: compile-time error -var set e, f; // //# 03: compile-time error +var set d; // /// 02: compile-time error +var set e, f; // /// 03: compile-time error class C0 { var get; - var get a; // //# 04: compile-time error - var get b, c; // //# 05: compile-time error + var get a; // /// 04: compile-time error + var get b, c; // /// 05: compile-time error var set; - var set d; // //# 06: compile-time error - var set e, f; // //# 07: compile-time error + var set d; // /// 06: compile-time error + var set e, f; // /// 07: compile-time error } class C1 { List get; List get a; - List get b, c; // //# 09: compile-time error + List get b, c; // /// 09: compile-time error List set; - List set d; // //# 10: compile-time error - List set e, f; // //# 11: compile-time error + List set d; // /// 10: compile-time error + List set e, f; // /// 11: compile-time error } class C2 { List get; List get a; - List get b, c; //# 13: compile-time error + List get b, c; /// 13: compile-time error List set; - List set d; // //# 14: compile-time error - List set e, f; //# 15: compile-time error + List set d; // /// 14: compile-time error + List set e, f; /// 15: compile-time error } main() { diff --git a/tests/language_strong/getter_no_setter2_test.dart b/tests/language_strong/getter_no_setter2_test.dart index a798b7e9e93..412df61de5e 100644 --- a/tests/language_strong/getter_no_setter2_test.dart +++ b/tests/language_strong/getter_no_setter2_test.dart @@ -12,25 +12,25 @@ class Example { { bool flag_exception = false; try { - nextVar++; // //# 03: static type warning + nextVar++; // /// 03: static type warning } catch (excpt) { flag_exception = true; } - Expect.isTrue(flag_exception); // //# 03: continued + Expect.isTrue(flag_exception); // /// 03: continued } { bool flag_exception = false; try { - this.nextVar++; // //# 00: static type warning + this.nextVar++; // /// 00: static type warning } catch (excpt) { flag_exception = true; } - Expect.isTrue(flag_exception); // //# 00: continued + Expect.isTrue(flag_exception); // /// 00: continued } } static test() { - nextVar++; // //# 01: runtime error - this.nextVar++; // //# 02: compile-time error + nextVar++; // /// 01: runtime error + this.nextVar++; // /// 02: compile-time error } } diff --git a/tests/language_strong/getter_no_setter_test.dart b/tests/language_strong/getter_no_setter_test.dart index 78535f741f7..493dee5153d 100644 --- a/tests/language_strong/getter_no_setter_test.dart +++ b/tests/language_strong/getter_no_setter_test.dart @@ -21,16 +21,16 @@ class Example { { bool flag_exception = false; try { - this.nextVar = 1; // //# 00: static type warning + this.nextVar = 1; // /// 00: static type warning } catch (excpt) { flag_exception = true; } - Expect.isTrue(flag_exception); // //# 00: continued + Expect.isTrue(flag_exception); // /// 00: continued } } static test() { - nextVar = 0; // //# 01: runtime error - this.nextVar = 0; // //# 02: compile-time error + nextVar = 0; // /// 01: runtime error + this.nextVar = 0; // /// 02: compile-time error } } diff --git a/tests/language_strong/getter_override2_test.dart b/tests/language_strong/getter_override2_test.dart index aad2af51be7..d468f4143ee 100644 --- a/tests/language_strong/getter_override2_test.dart +++ b/tests/language_strong/getter_override2_test.dart @@ -9,10 +9,10 @@ import "package:expect/expect.dart"; import "package:meta/meta.dart" show virtual; class A { - @virtual var foo = 42; // //# 00: ok - get foo => 42; // //# 01: ok - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: ok + @virtual var foo = 42; // /// 00: ok + get foo => 42; // /// 01: ok + foo() => 42; // /// 02: compile-time error + set foo(value) { } // /// 03: ok } class B extends A { diff --git a/tests/language_strong/getter_override_test.dart b/tests/language_strong/getter_override_test.dart index 350da736484..de5a8e70e04 100644 --- a/tests/language_strong/getter_override_test.dart +++ b/tests/language_strong/getter_override_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: static type warning + var foo = 42; // /// 00: compile-time error + get foo => 42; // /// 01: compile-time error + foo() => 42; // /// 02: compile-time error + set foo(value) { } // /// 03: static type warning } class B extends A { diff --git a/tests/language_strong/getter_parameters_test.dart b/tests/language_strong/getter_parameters_test.dart index c98a98af753..491a82b86a4 100644 --- a/tests/language_strong/getter_parameters_test.dart +++ b/tests/language_strong/getter_parameters_test.dart @@ -6,16 +6,16 @@ get f1 => null; get f2 -() //# 01: compile-time error +() /// 01: compile-time error => null; get f3 -(arg) //# 02: compile-time error +(arg) /// 02: compile-time error => null; get f4 -([arg]) //# 03: compile-time error +([arg]) /// 03: compile-time error => null; get f5 -({arg}) //# 04: compile-time error +({arg}) /// 04: compile-time error => null; main() { diff --git a/tests/language_strong/getters_setters2_test.dart b/tests/language_strong/getters_setters2_test.dart index 7ce79f31a0c..8f62f05dc0d 100644 --- a/tests/language_strong/getters_setters2_test.dart +++ b/tests/language_strong/getters_setters2_test.dart @@ -29,7 +29,7 @@ class T2 { A get field { return getterField; } // Type C is not assignable to A - void set field(C arg) { setterField = arg; } //# 01: static type warning + void set field(C arg) { setterField = arg; } /// 01: static type warning } class T3 { @@ -42,12 +42,12 @@ class T3 { main() { T1 instance1 = new T1(); - T2 instance2 = new T2(); //# 01: continued + T2 instance2 = new T2(); /// 01: continued T3 instance3 = new T3(); instance1.field = new B(); A resultA = instance1.field; - instance1.field = new A(); //# 03: dynamic type error + instance1.field = new A(); /// 03: dynamic type error B resultB = instance1.field; int result; @@ -55,7 +55,7 @@ main() { Expect.equals(37, result); // Type 'A' has no method named 'b' - instance1.field.b(); //# 02: static type warning + instance1.field.b(); /// 02: static type warning instance3.field = new B(); result = instance3.field.a(); diff --git a/tests/language_strong/getters_setters_type_test.dart b/tests/language_strong/getters_setters_type_test.dart index ee28943402a..ae18c0664da 100644 --- a/tests/language_strong/getters_setters_type_test.dart +++ b/tests/language_strong/getters_setters_type_test.dart @@ -8,11 +8,11 @@ import "package:expect/expect.dart"; int bar = 499; -int // //# 01: static type warning +int // /// 01: static type warning get foo => bar; void set foo( - String // //# 01: continued + String // /// 01: continued str) { bar = str.length; } main() { diff --git a/tests/language_strong/hidden_import_test.dart b/tests/language_strong/hidden_import_test.dart index 6722fdf153b..26be79c6719 100644 --- a/tests/language_strong/hidden_import_test.dart +++ b/tests/language_strong/hidden_import_test.dart @@ -12,6 +12,6 @@ import 'dart:async'; import 'dart:async' as prefix; main() { - new Future(); //# 01: static type warning - new prefix.Future(); //# 02: static type warning + new Future(); /// 01: static type warning + new prefix.Future(); /// 02: static type warning } \ No newline at end of file diff --git a/tests/language_strong/identical_const_test.dart b/tests/language_strong/identical_const_test.dart index 17324f33de6..cd96244823b 100644 --- a/tests/language_strong/identical_const_test.dart +++ b/tests/language_strong/identical_const_test.dart @@ -14,13 +14,13 @@ const identical_gg = identical(g, g); // Verify proper compile time computation of identical() const a = const { - identical_ff: 0, //# 01: static type warning - identical_gg: 0, //# 02: static type warning + identical_ff: 0, /// 01: static type warning + identical_gg: 0, /// 02: static type warning true: 0 }; const b = const { - identical_fg: 0, //# 03: static type warning - identical_gf: 0, //# 04: static type warning + identical_fg: 0, /// 03: static type warning + identical_gf: 0, /// 04: static type warning false: 0 }; use(x) => x; @@ -30,8 +30,8 @@ main() { use(b); // Verify proper run time computation of identical() - Expect.isTrue(identical_ff); //# 05: ok - Expect.isTrue(identical_gg); //# 06: ok - Expect.isFalse(identical_fg); //# 07: ok - Expect.isFalse(identical_gf); //# 08: ok + Expect.isTrue(identical_ff); /// 05: ok + Expect.isTrue(identical_gg); /// 06: ok + Expect.isFalse(identical_fg); /// 07: ok + Expect.isFalse(identical_gf); /// 08: ok } diff --git a/tests/language_strong/if_null_assignment_behavior_test.dart b/tests/language_strong/if_null_assignment_behavior_test.dart index 200d40fb4ff..e8b2dd66b01 100644 --- a/tests/language_strong/if_null_assignment_behavior_test.dart +++ b/tests/language_strong/if_null_assignment_behavior_test.dart @@ -126,10 +126,10 @@ class C { void instanceTest() { // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - vGetValue = 1; check(1, () => v ??= bad(), ['$s.v']); //# 01: ok - yGetValue = 1; check(1, () => v ??= y, ['$s.v', 'y', '$s.v=1']); //# 02: ok - check(1, () => finalOne ??= bad(), []); //# 03: static type warning - yGetValue = 1; checkThrows(noMethod, () => finalNull ??= y, ['y']); //# 04: static type warning + vGetValue = 1; check(1, () => v ??= bad(), ['$s.v']); /// 01: ok + yGetValue = 1; check(1, () => v ??= y, ['$s.v', 'y', '$s.v=1']); /// 02: ok + check(1, () => finalOne ??= bad(), []); /// 03: static type warning + yGetValue = 1; checkThrows(noMethod, () => finalNull ??= y, ['y']); /// 04: static type warning } } @@ -145,8 +145,8 @@ class D extends C { void derivedInstanceTest() { // super.v ??= e is equivalent to // ((x) => x == null ? super.v = e : x)(super.v) - vGetValue = 1; check(1, () => super.v ??= bad(), ['$s.v']); //# 05: ok - yGetValue = 1; check(1, () => super.v ??= y, ['$s.v', 'y', '$s.v=1']); //# 06: ok + vGetValue = 1; check(1, () => super.v ??= bad(), ['$s.v']); /// 05: ok + yGetValue = 1; check(1, () => super.v ??= y, ['$s.v', 'y', '$s.v=1']); /// 06: ok } } @@ -159,56 +159,56 @@ main() { new D('d').derivedInstanceTest(); // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - xGetValue = 1; check(1, () => x ??= bad(), ['x']); //# 07: ok - yGetValue = 1; check(1, () => x ??= y, ['x', 'y', 'x=1']); //# 08: ok - h.xGetValue = 1; check(1, () => h.x ??= bad(), ['h.x']); //# 09: ok - yGetValue = 1; check(1, () => h.x ??= y, ['h.x', 'y', 'h.x=1']); //# 10: ok - { var l = 1; check(1, () => l ??= bad(), []); } //# 11: ok - { var l; yGetValue = 1; check(1, () => l ??= y, ['y']); Expect.equals(1, l); } //# 12: ok - { final l = 1; check(1, () => l ??= bad(), []); } //# 13: static type warning - { final l = null; yGetValue = 1; checkThrows(noMethod, () => l ??= y, ['y']); } //# 14: static type warning - check(C, () => C ??= bad(), []); //# 15: static type warning - h ??= null; //# 29: compile-time error - h[0] ??= null; //# 30: compile-time error + xGetValue = 1; check(1, () => x ??= bad(), ['x']); /// 07: ok + yGetValue = 1; check(1, () => x ??= y, ['x', 'y', 'x=1']); /// 08: ok + h.xGetValue = 1; check(1, () => h.x ??= bad(), ['h.x']); /// 09: ok + yGetValue = 1; check(1, () => h.x ??= y, ['h.x', 'y', 'h.x=1']); /// 10: ok + { var l = 1; check(1, () => l ??= bad(), []); } /// 11: ok + { var l; yGetValue = 1; check(1, () => l ??= y, ['y']); Expect.equals(1, l); } /// 12: ok + { final l = 1; check(1, () => l ??= bad(), []); } /// 13: static type warning + { final l = null; yGetValue = 1; checkThrows(noMethod, () => l ??= y, ['y']); } /// 14: static type warning + check(C, () => C ??= bad(), []); /// 15: static type warning + h ??= null; /// 29: compile-time error + h[0] ??= null; /// 30: compile-time error // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - C.xGetValue = 1; check(1, () => C.x ??= bad(), ['C.x']); //# 16: ok - yGetValue = 1; check(1, () => C.x ??= y, ['C.x', 'y', 'C.x=1']); //# 17: ok - h.C.xGetValue = 1; check(1, () => h.C.x ??= bad(), ['h.C.x']); //# 18: ok - yGetValue = 1; check(1, () => h.C.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); //# 19: ok + C.xGetValue = 1; check(1, () => C.x ??= bad(), ['C.x']); /// 16: ok + yGetValue = 1; check(1, () => C.x ??= y, ['C.x', 'y', 'C.x=1']); /// 17: ok + h.C.xGetValue = 1; check(1, () => h.C.x ??= bad(), ['h.C.x']); /// 18: ok + yGetValue = 1; check(1, () => h.C.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); /// 19: ok // e1.v ??= e2 is equivalent to // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - xGetValue = new C('x'); xGetValue.vGetValue = 1; //# 20: ok - check(1, () => x.v ??= bad(), ['x', 'x.v']); // //# 20: continued - xGetValue = new C('x'); yGetValue = 1; // //# 21: ok - check(1, () => x.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); //# 21: continued - fValue = new C('f()'); fValue.vGetValue = 1; // //# 22: ok - check(1, () => f().v ??= bad(), ['f()', 'f().v']); //# 22: continued - fValue = new C('f()'); yGetValue = 1; // //# 23: ok - check(1, () => f().v ??= y, ['f()', 'f().v', 'y', 'f().v=1']); //# 23: continued + xGetValue = new C('x'); xGetValue.vGetValue = 1; /// 20: ok + check(1, () => x.v ??= bad(), ['x', 'x.v']); // /// 20: continued + xGetValue = new C('x'); yGetValue = 1; // /// 21: ok + check(1, () => x.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); /// 21: continued + fValue = new C('f()'); fValue.vGetValue = 1; // /// 22: ok + check(1, () => f().v ??= bad(), ['f()', 'f().v']); /// 22: continued + fValue = new C('f()'); yGetValue = 1; // /// 23: ok + check(1, () => f().v ??= y, ['f()', 'f().v', 'y', 'f().v=1']); /// 23: continued // e1[e2] ??= e3 is equivalent to // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - xGetValue = new C('x'); yGetValue = 1; xGetValue.indexGetValue = 2; //# 24: ok - check(2, () => x[y] ??= bad(), ['x', 'y', 'x[1]']); // //# 24: continued - xGetValue = new C('x'); yGetValue = 1; zGetValue = 2; // //# 25: ok - check(2, () => x[y] ??= z, ['x', 'y', 'x[1]', 'z', 'x[1]=2']); //# 25: continued + xGetValue = new C('x'); yGetValue = 1; xGetValue.indexGetValue = 2; /// 24: ok + check(2, () => x[y] ??= bad(), ['x', 'y', 'x[1]']); // /// 24: continued + xGetValue = new C('x'); yGetValue = 1; zGetValue = 2; // /// 25: ok + check(2, () => x[y] ??= z, ['x', 'y', 'x[1]', 'z', 'x[1]=2']); /// 25: continued // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - check(null, () => x?.v ??= bad(), ['x']); //# 26: ok - xGetValue = new C('x'); xGetValue.vGetValue = 1; //# 27: ok - check(1, () => x?.v ??= bad(), ['x', 'x.v']); // //# 27: continued - xGetValue = new C('x'); yGetValue = 1; // //# 28: ok - check(1, () => x?.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); //# 28: continued + check(null, () => x?.v ??= bad(), ['x']); /// 26: ok + xGetValue = new C('x'); xGetValue.vGetValue = 1; /// 27: ok + check(1, () => x?.v ??= bad(), ['x', 'x.v']); // /// 27: continued + xGetValue = new C('x'); yGetValue = 1; // /// 28: ok + check(1, () => x?.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); /// 28: continued // C?.v ??= e2 is equivalent to C.v ??= e2. - C.xGetValue = 1; // //# 29: ok - check(1, () => C?.x ??= bad(), ['C.x']); //# 29: continued - h.C.xgetValue = 1; // //# 30: ok - check(1, () => h.c?.x ??= bad(), ['h.C.x']); //# 30: continued - yGetValue = 1; // //# 31: ok - check(1, () => C?.x ??= y, ['C.x', 'y', 'C.x=1']); //# 31: continued - yGetValue = 1; // //# 32: ok - check(1, () => h.C?.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); //# 32: continued + C.xGetValue = 1; // /// 29: ok + check(1, () => C?.x ??= bad(), ['C.x']); /// 29: continued + h.C.xgetValue = 1; // /// 30: ok + check(1, () => h.c?.x ??= bad(), ['h.C.x']); /// 30: continued + yGetValue = 1; // /// 31: ok + check(1, () => C?.x ??= y, ['C.x', 'y', 'C.x=1']); /// 31: continued + yGetValue = 1; // /// 32: ok + check(1, () => h.C?.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); /// 32: continued } diff --git a/tests/language_strong/if_null_assignment_static_test.dart b/tests/language_strong/if_null_assignment_static_test.dart index 5f995cdd7e5..745b283d4d6 100644 --- a/tests/language_strong/if_null_assignment_static_test.dart +++ b/tests/language_strong/if_null_assignment_static_test.dart @@ -73,17 +73,17 @@ class DerivedClass extends ClassWithInstanceGetters { void derivedTest() { // The static type of super.v ??= e is the LUB of the static types of // super.v and e. - (super.a ??= new A()).a; //# 01: ok - Expect.throws(() => (super.a ??= new A()).b, noMethod); //# 02: static type warning - (super.a ??= new B()).a; //# 03: ok - (super.a ??= new B()).b; //# 04: static type warning + (super.a ??= new A()).a; /// 01: ok + Expect.throws(() => (super.a ??= new A()).b, noMethod); /// 02: static type warning + (super.a ??= new B()).a; /// 03: ok + (super.a ??= new B()).b; /// 04: static type warning if (!checkedMode) { - (super.b ??= new A()).a; //# 05: ok - Expect.throws(() => (super.b ??= new A()).b, noMethod); //# 06: static type warning + (super.b ??= new A()).a; /// 05: ok + Expect.throws(() => (super.b ??= new A()).b, noMethod); /// 06: static type warning // Exactly the same static warnings that would be caused by super.v = e // are also generated in the case of super.v ??= e. - super.b ??= new C(); //# 07: static type warning + super.b ??= new C(); /// 07: static type warning } } } @@ -96,76 +96,76 @@ main() { new DerivedClass().derivedTest(); // The static type of v ??= e is the LUB of the static types of v and e. - (a ??= new A()).a; //# 08: ok - Expect.throws(() => (a ??= new A()).b, noMethod); //# 09: static type warning - (a ??= new B()).a; //# 10: ok - (a ??= new B()).b; //# 11: static type warning + (a ??= new A()).a; /// 08: ok + Expect.throws(() => (a ??= new A()).b, noMethod); /// 09: static type warning + (a ??= new B()).a; /// 10: ok + (a ??= new B()).b; /// 11: static type warning if (!checkedMode) { - (b ??= new A()).a; //# 12: ok - Expect.throws(() => (b ??= new A()).b, noMethod); //# 13: static type warning + (b ??= new A()).a; /// 12: ok + Expect.throws(() => (b ??= new A()).b, noMethod); /// 13: static type warning // Exactly the same static warnings that would be caused by v = e are also // generated in the case of v ??= e. - b ??= new C(); //# 14: static type warning + b ??= new C(); /// 14: static type warning } // The static type of C.v ??= e is the LUB of the static types of C.v and e. - (ClassWithStaticGetters.a ??= new A()).a; //# 15: ok - Expect.throws(() => (ClassWithStaticGetters.a ??= new A()).b, noMethod); //# 16: static type warning - (ClassWithStaticGetters.a ??= new B()).a; //# 17: ok - (ClassWithStaticGetters.a ??= new B()).b; //# 18: static type warning + (ClassWithStaticGetters.a ??= new A()).a; /// 15: ok + Expect.throws(() => (ClassWithStaticGetters.a ??= new A()).b, noMethod); /// 16: static type warning + (ClassWithStaticGetters.a ??= new B()).a; /// 17: ok + (ClassWithStaticGetters.a ??= new B()).b; /// 18: static type warning if (!checkedMode) { - (ClassWithStaticGetters.b ??= new A()).a; //# 19: ok - Expect.throws(() => (ClassWithStaticGetters.b ??= new A()).b, noMethod); //# 20: static type warning + (ClassWithStaticGetters.b ??= new A()).a; /// 19: ok + Expect.throws(() => (ClassWithStaticGetters.b ??= new A()).b, noMethod); /// 20: static type warning // Exactly the same static warnings that would be caused by C.v = e are // also generated in the case of C.v ??= e. - ClassWithStaticGetters.b ??= new C(); //# 21: static type warning + ClassWithStaticGetters.b ??= new C(); /// 21: static type warning } // The static type of e1.v ??= e2 is the LUB of the static types of e1.v and // e2. - (new ClassWithInstanceGetters().a ??= new A()).a; //# 22: ok - Expect.throws(() => (new ClassWithInstanceGetters().a ??= new A()).b, noMethod); //# 23: static type warning - (new ClassWithInstanceGetters().a ??= new B()).a; //# 24: ok - (new ClassWithInstanceGetters().a ??= new B()).b; //# 25: static type warning + (new ClassWithInstanceGetters().a ??= new A()).a; /// 22: ok + Expect.throws(() => (new ClassWithInstanceGetters().a ??= new A()).b, noMethod); /// 23: static type warning + (new ClassWithInstanceGetters().a ??= new B()).a; /// 24: ok + (new ClassWithInstanceGetters().a ??= new B()).b; /// 25: static type warning if (!checkedMode) { - (new ClassWithInstanceGetters().b ??= new A()).a; //# 26: ok - Expect.throws(() => (new ClassWithInstanceGetters().b ??= new A()).b, noMethod); //# 27: static type warning + (new ClassWithInstanceGetters().b ??= new A()).a; /// 26: ok + Expect.throws(() => (new ClassWithInstanceGetters().b ??= new A()).b, noMethod); /// 27: static type warning // Exactly the same static warnings that would be caused by e1.v = e2 are // also generated in the case of e1.v ??= e2. - new ClassWithInstanceGetters().b ??= new C(); //# 28: static type warning + new ClassWithInstanceGetters().b ??= new C(); /// 28: static type warning } // The static type of e1[e2] ??= e3 is the LUB of the static types of e1[e2] // and e3. - (([null])[0] ??= new A()).a; //# 29: ok - Expect.throws(() => (([null])[0] ??= new A()).b, noMethod); //# 30: static type warning - (([null])[0] ??= new B()).a; //# 31: ok - (([null])[0] ??= new B()).b; //# 32: static type warning + (([null])[0] ??= new A()).a; /// 29: ok + Expect.throws(() => (([null])[0] ??= new A()).b, noMethod); /// 30: static type warning + (([null])[0] ??= new B()).a; /// 31: ok + (([null])[0] ??= new B()).b; /// 32: static type warning if (!checkedMode) { - (([null])[0] ??= new A()).a; //# 33: ok - Expect.throws(() => (([null])[0] ??= new A()).b, noMethod); //# 34: static type warning + (([null])[0] ??= new A()).a; /// 33: ok + Expect.throws(() => (([null])[0] ??= new A()).b, noMethod); /// 34: static type warning // Exactly the same static warnings that would be caused by e1[e2] = e3 are // also generated in the case of e1[e2] ??= e3. - ([null])[0] ??= new C(); //# 35: static type warning + ([null])[0] ??= new C(); /// 35: static type warning } // The static type of e1?.v op= e2 is the static type of e1.v op e2, // therefore the static type of e1?.v ??= e2 is the static type of // e1.v ?? e2, which is the LUB of the static types of e1?.v and e2. - (new ClassWithInstanceGetters()?.a ??= new A()).a; //# 36: ok - Expect.throws(() => (new ClassWithInstanceGetters()?.a ??= new A()).b, noMethod); //# 37: static type warning - (new ClassWithInstanceGetters()?.a ??= new B()).a; //# 38: ok - (new ClassWithInstanceGetters()?.a ??= new B()).b; //# 39: static type warning + (new ClassWithInstanceGetters()?.a ??= new A()).a; /// 36: ok + Expect.throws(() => (new ClassWithInstanceGetters()?.a ??= new A()).b, noMethod); /// 37: static type warning + (new ClassWithInstanceGetters()?.a ??= new B()).a; /// 38: ok + (new ClassWithInstanceGetters()?.a ??= new B()).b; /// 39: static type warning if (!checkedMode) { - (new ClassWithInstanceGetters()?.b ??= new A()).a; //# 40: ok - Expect.throws(() => (new ClassWithInstanceGetters()?.b ??= new A()).b, noMethod); //# 41: static type warning + (new ClassWithInstanceGetters()?.b ??= new A()).a; /// 40: ok + Expect.throws(() => (new ClassWithInstanceGetters()?.b ??= new A()).b, noMethod); /// 41: static type warning // Exactly the same static warnings that would be caused by e1.v ??= e2 are // also generated in the case of e1?.v ??= e2. - new ClassWithInstanceGetters()?.b ??= new C(); //# 42: static type warning + new ClassWithInstanceGetters()?.b ??= new C(); /// 42: static type warning } } diff --git a/tests/language_strong/if_null_behavior_test.dart b/tests/language_strong/if_null_behavior_test.dart index 6ad6d5271cb..c023d891433 100644 --- a/tests/language_strong/if_null_behavior_test.dart +++ b/tests/language_strong/if_null_behavior_test.dart @@ -34,20 +34,20 @@ main() { // status files easier to maintain. var _ = null ?? null; - Expect.equals(1, 1 ?? 2); //# 01: ok - Expect.equals(1, 1 ?? null); //# 02: ok - Expect.equals(2, null ?? 2); //# 03: ok - Expect.equals(null, null ?? null); //# 04: ok - Expect.equals('B', (new B('B') ?? new C('C')).a); //# 05: ok - Expect.equals('B', (new B('B') ?? new C('C')).b); //# 06: static type warning - Expect.throws(() => (new B('B') ?? new C('C')).c, noMethod); //# 07: static type warning - Expect.equals('B', (new B('B') ?? nullC()).a); //# 08: ok - Expect.equals('B', (new B('B') ?? nullC()).b); //# 09: static type warning - Expect.throws(() => (new B('B') ?? nullC()).c, noMethod); //# 10: static type warning - Expect.equals('C', (nullB() ?? new C('C')).a); //# 11: ok - Expect.throws(() => (nullB() ?? new C('C')).b, noMethod); //# 12: static type warning - Expect.equals('C', (nullB() ?? new C('C')).c); //# 13: static type warning - Expect.throws(() => (nullB() ?? nullC()).a, noMethod); //# 14: ok - Expect.throws(() => (nullB() ?? nullC()).b, noMethod); //# 15: static type warning - Expect.throws(() => (nullB() ?? nullC()).c, noMethod); //# 16: static type warning + Expect.equals(1, 1 ?? 2); /// 01: ok + Expect.equals(1, 1 ?? null); /// 02: ok + Expect.equals(2, null ?? 2); /// 03: ok + Expect.equals(null, null ?? null); /// 04: ok + Expect.equals('B', (new B('B') ?? new C('C')).a); /// 05: ok + Expect.equals('B', (new B('B') ?? new C('C')).b); /// 06: static type warning + Expect.throws(() => (new B('B') ?? new C('C')).c, noMethod); /// 07: static type warning + Expect.equals('B', (new B('B') ?? nullC()).a); /// 08: ok + Expect.equals('B', (new B('B') ?? nullC()).b); /// 09: static type warning + Expect.throws(() => (new B('B') ?? nullC()).c, noMethod); /// 10: static type warning + Expect.equals('C', (nullB() ?? new C('C')).a); /// 11: ok + Expect.throws(() => (nullB() ?? new C('C')).b, noMethod); /// 12: static type warning + Expect.equals('C', (nullB() ?? new C('C')).c); /// 13: static type warning + Expect.throws(() => (nullB() ?? nullC()).a, noMethod); /// 14: ok + Expect.throws(() => (nullB() ?? nullC()).b, noMethod); /// 15: static type warning + Expect.throws(() => (nullB() ?? nullC()).c, noMethod); /// 16: static type warning } diff --git a/tests/language_strong/if_null_evaluation_order_test.dart b/tests/language_strong/if_null_evaluation_order_test.dart index 5cfc2644395..9ebdafdaea9 100644 --- a/tests/language_strong/if_null_evaluation_order_test.dart +++ b/tests/language_strong/if_null_evaluation_order_test.dart @@ -31,6 +31,6 @@ main() { // status files easier to maintain. var _ = null ?? null; - Expect.equals(1, 1 ?? bad()); //# 01: ok - Expect.equals(2, first() ?? second()); //# 02: ok + Expect.equals(1, 1 ?? bad()); /// 01: ok + Expect.equals(2, first() ?? second()); /// 02: ok } diff --git a/tests/language_strong/if_null_precedence_test.dart b/tests/language_strong/if_null_precedence_test.dart index 95dcb5bb807..62033d310b7 100644 --- a/tests/language_strong/if_null_precedence_test.dart +++ b/tests/language_strong/if_null_precedence_test.dart @@ -26,39 +26,39 @@ main() { // "a ?? b ?? c" should be legal, and should evaluate to the first non-null // value (or null if there are no non-null values). - Expect.equals(1, 1 ?? 2 ?? 3); //# 01: ok - Expect.equals(2, null ?? 2 ?? 3); //# 02: ok - Expect.equals(3, null ?? null ?? 3); //# 03: ok - Expect.equals(null, null ?? null ?? null); //# 04: ok + Expect.equals(1, 1 ?? 2 ?? 3); /// 01: ok + Expect.equals(2, null ?? 2 ?? 3); /// 02: ok + Expect.equals(3, null ?? null ?? 3); /// 03: ok + Expect.equals(null, null ?? null ?? null); /// 04: ok // "a ?? b ? c : d" should parse as "(a ?? b) ? c : d", therefore provided // that a is true, b need not be a bool. An incorrect parse of // "a ?? (b ? c : d)" would require b to be a bool to avoid a static type // warning. - Expect.equals(2, true ?? 1 ? 2 : 3); //# 05: ok + Expect.equals(2, true ?? 1 ? 2 : 3); /// 05: ok // "a ?? b || c" should parse as "a ?? (b || c)", therefore it's a static // type warning if b doesn't have type bool. An incorrect parse of // "(a ?? b) || c" would allow b to have any type provided that a is bool. - Expect.equals(false, false ?? 1 || true); //# 06: static type warning + Expect.equals(false, false ?? 1 || true); /// 06: static type warning // "a || b ?? c" should parse as "(a || b) ?? c", therefore it is a static // type warning if b doesn't have type bool. An incorrect parse of // "a || (b ?? c)" would allow b to have any type provided that c is bool. if (checkedMode) { - Expect.throws(() => false || 1 ?? true, assertionError); //# 07: static type warning + Expect.throws(() => false || 1 ?? true, assertionError); /// 07: static type warning } else { - Expect.equals(false, false || 1 ?? true); // //# 07: continued + Expect.equals(false, false || 1 ?? true); // /// 07: continued } if (checkedMode) { // An incorrect parse of "a || (b ?? c)" would result in no checked-mode // error. - Expect.throws(() => false || null ?? true, assertionError); //# 08: ok + Expect.throws(() => false || null ?? true, assertionError); /// 08: ok } else { // An incorrect parse of "a || (b ?? c)" would result in c being evaluated. - int i = 0; // //# 08: continued - Expect.equals(false, false || null ?? i++ == 0); // //# 08: continued - Expect.equals(0, i); // //# 08: continued + int i = 0; // /// 08: continued + Expect.equals(false, false || null ?? i++ == 0); // /// 08: continued + Expect.equals(0, i); // /// 08: continued } } diff --git a/tests/language_strong/illegal_declaration_test.dart b/tests/language_strong/illegal_declaration_test.dart index 1b935f98ca7..25411518c3a 100644 --- a/tests/language_strong/illegal_declaration_test.dart +++ b/tests/language_strong/illegal_declaration_test.dart @@ -2,6 +2,6 @@ // 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. -[ // //# 01: compile-time error +[ // /// 01: compile-time error main() {} diff --git a/tests/language_strong/illegal_initializer_test.dart b/tests/language_strong/illegal_initializer_test.dart index de993c4aaf4..1158f23ab45 100644 --- a/tests/language_strong/illegal_initializer_test.dart +++ b/tests/language_strong/illegal_initializer_test.dart @@ -9,29 +9,29 @@ class A { class B extends A { B.c1() : super.foo - /* // //# 01: compile-time error + /* // /// 01: compile-time error () - */ // //# 01: continued + */ // /// 01: continued ; B.foo(); B.c2() : this.foo - /* // //# 02: compile-time error + /* // /// 02: compile-time error () - */ // //# 02: continued + */ // /// 02: continued ; B.c3() : super - /* // //# 03: compile-time error + /* // /// 03: compile-time error () - */ // //# 03: continued + */ // /// 03: continued ; B(); B.c4() : this - /* // //# 04: compile-time error + /* // /// 04: compile-time error () - */ // //# 04: continued + */ // /// 04: continued ; } diff --git a/tests/language_strong/illegal_invocation_test.dart b/tests/language_strong/illegal_invocation_test.dart index b0072413c0e..1feb33d2c7d 100644 --- a/tests/language_strong/illegal_invocation_test.dart +++ b/tests/language_strong/illegal_invocation_test.dart @@ -6,10 +6,10 @@ // Test for issue 1393. Invoking a library prefix name caused an internal error // in dartc. -import "illegal_invocation_lib.dart" as foo; // //# 01: compile-time error +import "illegal_invocation_lib.dart" as foo; // /// 01: compile-time error main() { // probably what the user meant was foo.foo(), but the qualifier refers // to the library prefix, not the method defined within the library. - foo(); // //# 01: continued + foo(); // /// 01: continued } diff --git a/tests/language_strong/implicit_this_test.dart b/tests/language_strong/implicit_this_test.dart index 51c2583f538..490e7e1c2dd 100644 --- a/tests/language_strong/implicit_this_test.dart +++ b/tests/language_strong/implicit_this_test.dart @@ -14,7 +14,7 @@ abstract class Abstract implements Interface { // This class does not implement "x" either, but it is not marked // abstract. -class SubAbstract1 extends Abstract { } //# 01: static type warning +class SubAbstract1 extends Abstract { } /// 01: static type warning // This class is implicitly abstract as it declares an abstract getter // method. @@ -24,7 +24,7 @@ class SubAbstract2 extends Abstract { // This class does not implement "x" either, but it is not marked // abstract. -class SubSubAbstract2 extends SubAbstract2 { } //# 04: static type warning +class SubSubAbstract2 extends SubAbstract2 { } /// 04: static type warning class Concrete extends Abstract { get x => 7; @@ -36,11 +36,11 @@ class SubConcrete extends Concrete { } void main() { - var x = new Abstract(); //# 02: runtime error - var y = new SubAbstract1(); //# 01: continued + var x = new Abstract(); /// 02: runtime error + var y = new SubAbstract1(); /// 01: continued var z = new SubAbstract2(); - var a = new SubSubAbstract2(); //# 04: continued - Expect.equals(x, x); //# 02: continued + var a = new SubSubAbstract2(); /// 04: continued + Expect.equals(x, x); /// 02: continued Expect.equals('7', new Concrete().toString()); Expect.equals('42', new SubConcrete(42).toString()); Expect.equals('7', new SubConcrete(new Concrete()).toString()); diff --git a/tests/language_strong/import_combinators_part.dart b/tests/language_strong/import_combinators_part.dart index c1dea972bed..1e49a6cd6fe 100644 --- a/tests/language_strong/import_combinators_part.dart +++ b/tests/language_strong/import_combinators_part.dart @@ -5,7 +5,7 @@ // This file is part of the test import_combinators_test.dart // VM ignores the library name. -part of Foo; // //# static warning +part of Foo; // /// static warning lookBehindCurtain() { return show; // show is an imported identifier. diff --git a/tests/language_strong/import_private_test.dart b/tests/language_strong/import_private_test.dart index 2720eeb5096..21d3a140c63 100644 --- a/tests/language_strong/import_private_test.dart +++ b/tests/language_strong/import_private_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // Check that private dart:_ libraries cannot be imported. -import "dart:_internal"; // //# 01: compile-time error +import "dart:_internal"; // /// 01: compile-time error main() { print("Done."); diff --git a/tests/language_strong/import_self_test.dart b/tests/language_strong/import_self_test.dart index 977efa6779d..ae25bc0e72d 100644 --- a/tests/language_strong/import_self_test.dart +++ b/tests/language_strong/import_self_test.dart @@ -11,7 +11,7 @@ import "package:expect/expect.dart"; // Eliminate the import of the unmodified file or else the analyzer // will generate the static warning in the import_self_test_none case. -import "import_self_test.dart" as p; // //# 01: continued +import "import_self_test.dart" as p; // /// 01: continued var _x = "The quick brown fox jumps over the dazy log"; @@ -21,8 +21,8 @@ main() { // Check that referencing p._x causes a warning from the analyzer, // and the runtime fails to resolve p._x, even though it refers to // top level variable _x of this file. - Expect.throws(() { t = p._x; }, // //# 01: static type warning - (e) => e is NoSuchMethodError); // //# 01: continued + Expect.throws(() { t = p._x; }, // /// 01: static type warning + (e) => e is NoSuchMethodError); // /// 01: continued Expect.isTrue(t.endsWith("Zwerg")); } diff --git a/tests/language_strong/inferrer_constructor5_test.dart b/tests/language_strong/inferrer_constructor5_test.dart index 7c416f491f5..37b62f1084d 100644 --- a/tests/language_strong/inferrer_constructor5_test.dart +++ b/tests/language_strong/inferrer_constructor5_test.dart @@ -6,7 +6,7 @@ import "package:expect/expect.dart"; class A { A() { - print(field + 42); //# 01: static type warning + print(field + 42); /// 01: static type warning } } @@ -18,5 +18,5 @@ class B extends A { } main() { - Expect.throws(() => new B(), (e) => e is NoSuchMethodError); //# 01: continued + Expect.throws(() => new B(), (e) => e is NoSuchMethodError); /// 01: continued } diff --git a/tests/language_strong/instanceof4_test.dart b/tests/language_strong/instanceof4_test.dart index 4bcfadde8cd..8a7de67b6c9 100644 --- a/tests/language_strong/instanceof4_test.dart +++ b/tests/language_strong/instanceof4_test.dart @@ -22,23 +22,23 @@ testFooString() { Expect.isTrue(!o.isNotT()); Expect.isTrue(o.isListT()); Expect.isTrue(!o.isNotListT()); - Expect.isTrue(!o.isAlsoListT()); // //# 01: ok - Expect.isTrue(o.isNeitherListT()); // //# 01: ok + Expect.isTrue(!o.isAlsoListT()); // /// 01: ok + Expect.isTrue(o.isNeitherListT()); // /// 01: ok for (var i = 0; i < 20; i++) { // Make sure methods are optimized. o.isT(); o.isNotT(); o.isListT(); o.isNotListT(); - o.isAlsoListT(); // //# 01: ok - o.isNeitherListT(); // //# 01: ok + o.isAlsoListT(); // /// 01: ok + o.isNeitherListT(); // /// 01: ok } Expect.isTrue(o.isT(), "1"); Expect.isTrue(!o.isNotT(), "2"); Expect.isTrue(o.isListT(), "3"); Expect.isTrue(!o.isNotListT(), "4"); - Expect.isTrue(!o.isAlsoListT(), "5"); // //# 01: ok - Expect.isTrue(o.isNeitherListT(), "6"); // //# 01: ok + Expect.isTrue(!o.isAlsoListT(), "5"); // /// 01: ok + Expect.isTrue(o.isNeitherListT(), "6"); // /// 01: ok } testFooInt() { diff --git a/tests/language_strong/instantiate_type_variable_test.dart b/tests/language_strong/instantiate_type_variable_test.dart index 65ef440b933..b56592f10f8 100644 --- a/tests/language_strong/instantiate_type_variable_test.dart +++ b/tests/language_strong/instantiate_type_variable_test.dart @@ -7,7 +7,7 @@ class Foo { Foo() {} T make() { - return new T(); // //# 01: runtime error + return new T(); // /// 01: runtime error } } diff --git a/tests/language_strong/interface_cycle_test.dart b/tests/language_strong/interface_cycle_test.dart index 0e44708fa26..f0480bb7fda 100644 --- a/tests/language_strong/interface_cycle_test.dart +++ b/tests/language_strong/interface_cycle_test.dart @@ -8,11 +8,11 @@ class C implements B {} class A implements B {} class B - implements A // //# 01: compile-time error - implements A // //# 02: compile-time error + implements A // /// 01: compile-time error + implements A // /// 02: compile-time error {} main() { - new C(); // //# 01: continued - new List(); // //# 02: continued + new C(); // /// 01: continued + new List(); // /// 02: continued } diff --git a/tests/language_strong/interface_inherit_field_test.dart b/tests/language_strong/interface_inherit_field_test.dart index cfe5418e1aa..354b1eaf5cb 100644 --- a/tests/language_strong/interface_inherit_field_test.dart +++ b/tests/language_strong/interface_inherit_field_test.dart @@ -5,11 +5,11 @@ // Test that it is legal to override a field with a field in an interface. abstract class IA { - final int foo; //# static warning + final int foo; /// static warning } abstract class IB implements IA { - final int foo; //# static warning + final int foo; /// static warning } class B implements IB { diff --git a/tests/language_strong/interface_test.dart b/tests/language_strong/interface_test.dart index 14ea335994c..cb475a70623 100644 --- a/tests/language_strong/interface_test.dart +++ b/tests/language_strong/interface_test.dart @@ -37,5 +37,5 @@ class InterfaceTest implements Ai, Aai, Abi, Baz, Bi { main() { // instantiate an abstract class - var o = new Bi(); //# 00: static type warning + var o = new Bi(); /// 00: static type warning } diff --git a/tests/language_strong/internal_library_test.dart b/tests/language_strong/internal_library_test.dart index 51021c09569..21785f65233 100644 --- a/tests/language_strong/internal_library_test.dart +++ b/tests/language_strong/internal_library_test.dart @@ -7,12 +7,12 @@ library internal_library_test; import 'dart:core'; // This loads 'dart:_foreign_helper' and 'patch:core'. -import 'dart:_foreign_helper'; //# 01: compile-time error +import 'dart:_foreign_helper'; /// 01: compile-time error // TODO(vsm): Restore once #618 is fixed. -// part 'dart:_foreign_helper'; //# 02: static type warning +// part 'dart:_foreign_helper'; /// 02: static type warning void main() { - JS('int', '0'); //# 01: continued - // JS('int', '0'); //# 02: continued + JS('int', '0'); /// 01: continued + // JS('int', '0'); /// 02: continued } \ No newline at end of file diff --git a/tests/language_strong/is_malformed_type_test.dart b/tests/language_strong/is_malformed_type_test.dart index 6c85bbac4fd..99c8efa1adc 100644 --- a/tests/language_strong/is_malformed_type_test.dart +++ b/tests/language_strong/is_malformed_type_test.dart @@ -12,7 +12,7 @@ test99(e) { // Test that a runtime error is thrown when the 'is' operator checks for a // malformed type. try { - if (e is Undefined) Expect.fail("unreachable"); // //# 99: continued + if (e is Undefined) Expect.fail("unreachable"); // /// 99: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -23,7 +23,7 @@ test98(e) { // Test that a runtime error is thrown when the 'as' operator checks for a // malformed type. try { - if (e as Undefined) Expect.fail("unreachable"); // //# 98: continued + if (e as Undefined) Expect.fail("unreachable"); // /// 98: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -36,7 +36,7 @@ test97(e) { // with malformed type is parsed, but not executed at runtime. // Regression test for issue 16985. evalCount = 0; - if (e is Undefined && testEval(e)) Expect.fail("unreachable"); // //# 97: continued + if (e is Undefined && testEval(e)) Expect.fail("unreachable"); // /// 97: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -50,7 +50,7 @@ test96(e) { // with malformed type is parsed, but not executed at runtime. // Regression test for issue 16985. evalCount = 0; - if (e as Undefined && testEval(e)) Expect.fail("unreachable"); // //# 96: continued + if (e as Undefined && testEval(e)) Expect.fail("unreachable"); // /// 96: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -63,7 +63,7 @@ test95(e) { // runtime error is thrown. try { evalCount = 0; - if (testEval(e) is Undefined) Expect.fail("unreachable"); // //# 95: continued + if (testEval(e) is Undefined) Expect.fail("unreachable"); // /// 95: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -76,7 +76,7 @@ test94(e) { // runtime error is thrown. try { evalCount = 0; - if (testEval(e) as Undefined) Expect.fail("unreachable"); // //# 94: continued + if (testEval(e) as Undefined) Expect.fail("unreachable"); // /// 94: continued Expect.fail("unreachable"); } catch(exc) { Expect.isTrue(exc is TypeError); @@ -85,10 +85,10 @@ test94(e) { } main() { - test99("99 bottles"); //# 99: static type warning - test98("98 bottles"); //# 98: static type warning - test97("97 bottles"); //# 97: static type warning - test96("96 bottles"); //# 96: static type warning - test95("95 bottles"); //# 95: static type warning - test94("94 bottles"); //# 94: static type warning + test99("99 bottles"); /// 99: static type warning + test98("98 bottles"); /// 98: static type warning + test97("97 bottles"); /// 97: static type warning + test96("96 bottles"); /// 96: static type warning + test95("95 bottles"); /// 95: static type warning + test94("94 bottles"); /// 94: static type warning } diff --git a/tests/language_strong/issue1363_test.dart b/tests/language_strong/issue1363_test.dart index 7d85cd84be8..6c9073b7b90 100644 --- a/tests/language_strong/issue1363_test.dart +++ b/tests/language_strong/issue1363_test.dart @@ -23,7 +23,7 @@ class C { C contents = myCup.getContents(); // expect no warning or error bool hasThrown = false; try { - contents = libCup.getContents(); //# static type warning + contents = libCup.getContents(); /// static type warning } on TypeError catch (e) { hasThrown = true; } diff --git a/tests/language_strong/issue15606_test.dart b/tests/language_strong/issue15606_test.dart index ea963d7664c..d50b576b54a 100644 --- a/tests/language_strong/issue15606_test.dart +++ b/tests/language_strong/issue15606_test.dart @@ -9,13 +9,13 @@ var a = [new Object(), 42]; main() { while (false) { // Comply to inlining heuristics. // Use an unresolved prefix. - var foo = Unresolved.foo( //# 01: static type warning + var foo = Unresolved.foo( /// 01: static type warning // Make dart2js generate a call to setRuntimeTypeInfo. - new Foo(), //# 01: continued + new Foo(), /// 01: continued // Use a one-shot interceptor. - a[0].toString()); //# 01: continued + a[0].toString()); /// 01: continued // Do an is test on `Foo` to require setRuntimeTypeInfo. - print(foo is Foo); //# 01: continued + print(foo is Foo); /// 01: continued } } diff --git a/tests/language_strong/issue18628_1_test.dart b/tests/language_strong/issue18628_1_test.dart index 3856b3e7457..9481efde144 100644 --- a/tests/language_strong/issue18628_1_test.dart +++ b/tests/language_strong/issue18628_1_test.dart @@ -11,10 +11,10 @@ class C { // This line is supposed to cause the warning; the other commented // line just doesn't make sense without this line. - T t = int; //# 01: static type warning + T t = int; /// 01: static type warning } main() { C c = new C(); - print(c.t); //# 01: static type warning + print(c.t); /// 01: static type warning } diff --git a/tests/language_strong/issue18628_2_test.dart b/tests/language_strong/issue18628_2_test.dart index 3232ea0fbae..a6e1cfd73e4 100644 --- a/tests/language_strong/issue18628_2_test.dart +++ b/tests/language_strong/issue18628_2_test.dart @@ -12,9 +12,9 @@ class X {} // This line is supposed to cause the warning; the other lines are // marked because they don't make sense when [Y] is not defined. -class Y extends X {} //# 01: static type warning +class Y extends X {} /// 01: static type warning main() { - X x = new X(); //# 01: static type warning - Y y = new Y(); //# 01: static type warning + X x = new X(); /// 01: static type warning + Y y = new Y(); /// 01: static type warning } diff --git a/tests/language_strong/issue_22780_test.dart b/tests/language_strong/issue_22780_test.dart index 34dabd6ed5e..6e54dcfb0b8 100644 --- a/tests/language_strong/issue_22780_test.dart +++ b/tests/language_strong/issue_22780_test.dart @@ -3,5 +3,5 @@ // BSD-style license that can be found in the LICENSE file. main() { - f() => "Oh, the joy of ${f()}"; print(f()); //# 01: runtime error + f() => "Oh, the joy of ${f()}"; print(f()); /// 01: runtime error } diff --git a/tests/language_strong/keyword_type_expression_test.dart b/tests/language_strong/keyword_type_expression_test.dart index e375c17d4b3..6edea2ced72 100644 --- a/tests/language_strong/keyword_type_expression_test.dart +++ b/tests/language_strong/keyword_type_expression_test.dart @@ -5,11 +5,11 @@ // Test that a keyword can't be used as type. Serves as regression test for // crashes in dart2js. -in greeting = "fisk"; // //# 01: compile-time error +in greeting = "fisk"; // /// 01: compile-time error main( -in greeting // //# 02: compile-time error +in greeting // /// 02: compile-time error ) { - in greeting = "fisk"; // //# 03: compile-time error - print(greeting); // //# 01: continued + in greeting = "fisk"; // /// 03: compile-time error + print(greeting); // /// 01: continued } diff --git a/tests/language_strong/least_upper_bound_expansive_test.dart b/tests/language_strong/least_upper_bound_expansive_test.dart index aaa50b9d336..704b2a384fa 100644 --- a/tests/language_strong/least_upper_bound_expansive_test.dart +++ b/tests/language_strong/least_upper_bound_expansive_test.dart @@ -40,17 +40,17 @@ void testC1(bool z, C1 a, N> b) { // Object is the most specific type in the intersection of the supertypes. // Is least upper bound dynamic? - (z ? a : b).z; //# 01: static type warning + (z ? a : b).z; /// 01: static type warning // Is least upper bound N<...> ? - (z ? a : b).n; //# 02: static type warning + (z ? a : b).n; /// 02: static type warning // Is least upper bound C1<...> ? - (z ? a : b).c1; //# 03: static type warning + (z ? a : b).c1; /// 03: static type warning // Is least upper bound N ? - (z ? a : b).n.z; //# 04: static type warning + (z ? a : b).n.z; /// 04: static type warning // Is least upper bound N> ? - (z ? a : b).n.n; //# 05: static type warning + (z ? a : b).n.n; /// 05: static type warning // Is least upper bound N> ? - (z ? a : b).n.c1; //# 06: static type warning + (z ? a : b).n.c1; /// 06: static type warning } } @@ -81,17 +81,17 @@ void testC2(bool z, C2 a, N> b) { // Object is the most specific type in the intersection of the supertypes. // Is least upper bound dynamic? - (z ? a : b).z; //# 07: static type warning + (z ? a : b).z; /// 07: static type warning // Is least upper bound N<...> ? - (z ? a : b).n; //# 08: static type warning + (z ? a : b).n; /// 08: static type warning // Is least upper bound C2<...> ? - (z ? a : b).c2; //# 09: static type warning + (z ? a : b).c2; /// 09: static type warning // Is least upper bound N ? - (z ? a : b).n.z; //# 10: static type warning + (z ? a : b).n.z; /// 10: static type warning // Is least upper bound N> ? - (z ? a : b).n.n; //# 11: static type warning + (z ? a : b).n.n; /// 11: static type warning // Is least upper bound N> ? - (z ? a : b).n.c2; //# 12: static type warning + (z ? a : b).n.c2; /// 12: static type warning } } diff --git a/tests/language_strong/least_upper_bound_test.dart b/tests/language_strong/least_upper_bound_test.dart index d75f35911f6..410671a8c74 100644 --- a/tests/language_strong/least_upper_bound_test.dart +++ b/tests/language_strong/least_upper_bound_test.dart @@ -37,34 +37,34 @@ void main() { } void testAB(A a, B b) { - A r1 = true ? a : b; //# 01: ok - B r2 = false ? a : b; //# 02: ok - (true ? a : b).a = 0; //# 03: static type warning - (false ? a : b).b = 0; //# 04: static type warning + A r1 = true ? a : b; /// 01: ok + B r2 = false ? a : b; /// 02: ok + (true ? a : b).a = 0; /// 03: static type warning + (false ? a : b).b = 0; /// 04: static type warning var c = new C(); - (true ? a : c).a = 0; //# 05: ok - (false ? c : b).b = 0; //# 06: ok + (true ? a : c).a = 0; /// 05: ok + (false ? c : b).b = 0; /// 06: ok } void testBC(B b, C c) { - B r1 = true ? b : c; //# 07: ok - C r2 = false ? b : c; //# 08: ok - (true ? b : c).b = 0; //# 09: ok - (false ? b : c).c = 0; //# 10: static type warning + B r1 = true ? b : c; /// 07: ok + C r2 = false ? b : c; /// 08: ok + (true ? b : c).b = 0; /// 09: ok + (false ? b : c).c = 0; /// 10: static type warning var a = null; - (true ? b : a).b = 0; //# 11: ok - (false ? a : b).c = 0; //# 12: ok - (true ? c : a).b = 0; //# 13: ok - (false ? a : c).c = 0; //# 14: ok + (true ? b : a).b = 0; /// 11: ok + (false ? a : b).c = 0; /// 12: ok + (true ? c : a).b = 0; /// 13: ok + (false ? a : c).c = 0; /// 14: ok } void testCD(C c, D d) { - C r1 = true ? c : d; //# 15: ok - D r2 = false ? c : d; //# 16: ok - (true ? c : d).b = 0; //# 17: ok - (false ? c : d).b = 0; //# 18: ok - (true ? c : d).c = 0; //# 19: static type warning - (false ? c : d).d = 0; //# 20: static type warning + C r1 = true ? c : d; /// 15: ok + D r2 = false ? c : d; /// 16: ok + (true ? c : d).b = 0; /// 17: ok + (false ? c : d).b = 0; /// 18: ok + (true ? c : d).c = 0; /// 19: static type warning + (false ? c : d).d = 0; /// 20: static type warning } void testEE(E e, E f) { @@ -72,16 +72,16 @@ void testEE(E e, E f) { // {E, Object} for E and // {E, Object} for E and // Object is the most specific type in the intersection of the supertypes. - E r1 = true ? e : f; //# 21: ok - F r2 = false ? e : f; //# 22: ok + E r1 = true ? e : f; /// 21: ok + F r2 = false ? e : f; /// 22: ok try { - A r3 = true ? e : f; //# 23: ok - B r4 = false ? e : f; //# 24: ok + A r3 = true ? e : f; /// 23: ok + B r4 = false ? e : f; /// 24: ok } catch (e) { // Type error in checked mode. } - (true ? e : f).e = null; //# 25: static type warning - (false ? e : f).e = null; //# 26: static type warning + (true ? e : f).e = null; /// 25: static type warning + (false ? e : f).e = null; /// 26: static type warning } void testEF(E e, F f) { @@ -89,15 +89,15 @@ void testEF(E e, F f) { // {E, Object} for E and // {F, E, Object} for F and // Object is the most specific type in the intersection of the supertypes. - E r1 = true ? e : f; //# 27: ok - F r2 = false ? e : f; //# 28: ok + E r1 = true ? e : f; /// 27: ok + F r2 = false ? e : f; /// 28: ok try { - A r3 = true ? e : f; //# 29: ok - B r4 = false ? e : f; //# 30: ok + A r3 = true ? e : f; /// 29: ok + B r4 = false ? e : f; /// 30: ok } catch (e) { // Type error in checked mode. } var r5; - r5 = (true ? e : f).e; //# 31: static type warning - r5 = (false ? e : f).f; //# 32: static type warning + r5 = (true ? e : f).e; /// 31: static type warning + r5 = (false ? e : f).f; /// 32: static type warning } \ No newline at end of file diff --git a/tests/language_strong/library_ambiguous_test.dart b/tests/language_strong/library_ambiguous_test.dart index ccac0087c07..aef63330484 100644 --- a/tests/language_strong/library_ambiguous_test.dart +++ b/tests/language_strong/library_ambiguous_test.dart @@ -9,15 +9,15 @@ import "library1.dart"; // Defines top level variable 'foo' import "library2.dart"; // Defines top level variable 'foo' class X -extends baw // //# 05: compile-time error +extends baw // /// 05: compile-time error {} main() { - print(foo); // //# 00: runtime error - print(bar()); // //# 01: runtime error - print(baz()); // //# 02: runtime error - print(bay()); // //# 03: runtime error - print(main is bax); // //# 04: static type warning, runtime error - var x = new X(); // //# 05: continued + print(foo); // /// 00: runtime error + print(bar()); // /// 01: runtime error + print(baz()); // /// 02: runtime error + print(bay()); // /// 03: runtime error + print(main is bax); // /// 04: static type warning, runtime error + var x = new X(); // /// 05: continued print("No error expected if ambiguous definitions are not used."); } diff --git a/tests/language_strong/list_literal1_test.dart b/tests/language_strong/list_literal1_test.dart index 726177ab9fd..11192800721 100644 --- a/tests/language_strong/list_literal1_test.dart +++ b/tests/language_strong/list_literal1_test.dart @@ -6,6 +6,6 @@ main() { var m = const - // //# 01: static type warning, checked mode compile-time error + // /// 01: static type warning, checked mode compile-time error [0, 1]; } diff --git a/tests/language_strong/list_literal_syntax_test.dart b/tests/language_strong/list_literal_syntax_test.dart index c1a2060a00c..c9c33204189 100644 --- a/tests/language_strong/list_literal_syntax_test.dart +++ b/tests/language_strong/list_literal_syntax_test.dart @@ -9,41 +9,41 @@ abstract class I {} void main() { var list; list = [0]; Expect.equals(1, list.length); list = [0]; Expect.equals(1, list.length); list = [0]; Expect.equals(1, list.length); list = - <> //# 04: compile-time error + <> /// 04: compile-time error [0]; Expect.equals(1, list.length); list = - <<>> //# 05: compile-time error + <<>> /// 05: compile-time error [0]; Expect.equals(1, list.length); list = - <<<>>> //# 06: compile-time error + <<<>>> /// 06: compile-time error [0]; Expect.equals(1, list.length); list = - <[]> //# 07: compile-time error + <[]> /// 07: compile-time error [0]; Expect.equals(1, list.length); diff --git a/tests/language_strong/literal_unary_plus_test.dart b/tests/language_strong/literal_unary_plus_test.dart index 6c1932e5c1c..de484e6b42d 100644 --- a/tests/language_strong/literal_unary_plus_test.dart +++ b/tests/language_strong/literal_unary_plus_test.dart @@ -6,8 +6,8 @@ // Only a number literal can be preceded by a "+'". main() { - var a = + 1; // //# 01: compile-time error - var x = +"foo"; // //# 02: compile-time error - var x = + "foo"; // //# 03: compile-time error + var a = + 1; // /// 01: compile-time error + var x = +"foo"; // /// 02: compile-time error + var x = + "foo"; // /// 03: compile-time error } diff --git a/tests/language_strong/main_not_a_function_test.dart b/tests/language_strong/main_not_a_function_test.dart index bbdf765c19c..e2eec9643be 100644 --- a/tests/language_strong/main_not_a_function_test.dart +++ b/tests/language_strong/main_not_a_function_test.dart @@ -2,8 +2,8 @@ // 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. -/* //# 01: static type warning, runtime error +/* /// 01: static type warning, runtime error main() {} -*/ //# 01: continued +*/ /// 01: continued -var main; //# 01: continued +var main; /// 01: continued diff --git a/tests/language_strong/main_test.dart b/tests/language_strong/main_test.dart index db9324d874d..151636b4659 100644 --- a/tests/language_strong/main_test.dart +++ b/tests/language_strong/main_test.dart @@ -4,21 +4,21 @@ main( -a // //# 01: ok -a, b // //# 02: ok -a, b, c // //# 03: static type warning, runtime error -a, b, {c} //# 04: ok -a, b, [c] //# 05: ok +a // /// 01: ok +a, b // /// 02: ok +a, b, c // /// 03: static type warning, runtime error +a, b, {c} /// 04: ok +a, b, [c] /// 05: ok -[a] // //# 20: ok -a, [b] // //# 21: ok -[a, b] // //# 22: ok +[a] // /// 20: ok +a, [b] // /// 21: ok +[a, b] // /// 22: ok -{a} // //# 41: ok -a, {b} // //# 42: ok -{a, b} // //# 43: ok -[a, b, c] //# 44: ok -{a, b, c} //# 45: ok +{a} // /// 41: ok +a, {b} // /// 42: ok +{a, b} // /// 43: ok +[a, b, c] /// 44: ok +{a, b, c} /// 45: ok ) { } diff --git a/tests/language_strong/malbounded_instantiation_test.dart b/tests/language_strong/malbounded_instantiation_test.dart index 6e725ef9bbb..78ace6a2978 100644 --- a/tests/language_strong/malbounded_instantiation_test.dart +++ b/tests/language_strong/malbounded_instantiation_test.dart @@ -5,11 +5,11 @@ import 'package:expect/expect.dart'; class Super {} -class Malbounded1 implements Super {} // //# 01: static type warning -class Malbounded2 extends Super {} // //# 02: static type warning +class Malbounded1 implements Super {} // /// 01: static type warning +class Malbounded2 extends Super {} // /// 02: static type warning main() { - new Malbounded1(); // //# 01: static type warning - new Malbounded2(); // //# 02: static type warning, dynamic type error - new Super(); // //# 03: static type warning, dynamic type error + new Malbounded1(); // /// 01: static type warning + new Malbounded2(); // /// 02: static type warning, dynamic type error + new Super(); // /// 03: static type warning, dynamic type error } diff --git a/tests/language_strong/malbounded_redirecting_factory2_test.dart b/tests/language_strong/malbounded_redirecting_factory2_test.dart index afb19c634bf..f459974d045 100644 --- a/tests/language_strong/malbounded_redirecting_factory2_test.dart +++ b/tests/language_strong/malbounded_redirecting_factory2_test.dart @@ -5,17 +5,17 @@ import 'package:expect/expect.dart'; class A implements B, C { } class B { factory B() = A; } class C { factory C() = B; } @@ -26,8 +26,8 @@ class D { main() { new D().test(); - new D().test(); // //# 01: static type warning - new D().test(); // //# 02: static type warning, dynamic type error - new D().test(); // //# 03: static type warning, dynamic type error - new D().test(); // //# 04: static type warning, dynamic type error + new D().test(); // /// 01: static type warning + new D().test(); // /// 02: static type warning, dynamic type error + new D().test(); // /// 03: static type warning, dynamic type error + new D().test(); // /// 04: static type warning, dynamic type error } diff --git a/tests/language_strong/malbounded_redirecting_factory_test.dart b/tests/language_strong/malbounded_redirecting_factory_test.dart index 0ce6d0ac856..1c9b8de22f8 100644 --- a/tests/language_strong/malbounded_redirecting_factory_test.dart +++ b/tests/language_strong/malbounded_redirecting_factory_test.dart @@ -5,25 +5,25 @@ import 'package:expect/expect.dart'; class A implements B, C { } class B { factory B() = A; } class C { factory C() = B; } main() { new C(); - new C(); // //# 01: static type warning - new C(); // //# 02: static type warning, dynamic type error - new C(); // //# 03: static type warning, dynamic type error - new C(); // //# 04: static type warning, dynamic type error + new C(); // /// 01: static type warning + new C(); // /// 02: static type warning, dynamic type error + new C(); // /// 03: static type warning, dynamic type error + new C(); // /// 04: static type warning, dynamic type error } diff --git a/tests/language_strong/malbounded_type_cast2_test.dart b/tests/language_strong/malbounded_type_cast2_test.dart index 1fd8baa2cc2..7dc095a207c 100644 --- a/tests/language_strong/malbounded_type_cast2_test.dart +++ b/tests/language_strong/malbounded_type_cast2_test.dart @@ -18,7 +18,7 @@ class A { } class B { test() { - new A() as A; // //# static type warning + new A() as A; // /// static type warning } } diff --git a/tests/language_strong/malbounded_type_cast_test.dart b/tests/language_strong/malbounded_type_cast_test.dart index b3d55214f10..4bdcb665058 100644 --- a/tests/language_strong/malbounded_type_cast_test.dart +++ b/tests/language_strong/malbounded_type_cast_test.dart @@ -5,13 +5,13 @@ import 'package:expect/expect.dart'; class Super {} -class Malbounded1 implements Super {} // //# static type warning -class Malbounded2 extends Super {} // //# static type warning +class Malbounded1 implements Super {} // /// static type warning +class Malbounded2 extends Super {} // /// static type warning main() { bool inCheckedMode = false; try { - String a = 42; //# static type warning + String a = 42; /// static type warning } catch (e) { inCheckedMode = true; } @@ -28,5 +28,5 @@ main() { var s = new Super(); Expect.throws(() => s as Malbounded1, (e) => e is CastError); Expect.throws(() => s as Malbounded2, expectedError); - Expect.throws(() => s as Super, expectedError); //# static type warning + Expect.throws(() => s as Super, expectedError); /// static type warning } diff --git a/tests/language_strong/malbounded_type_test2_test.dart b/tests/language_strong/malbounded_type_test2_test.dart index 3dbb436f469..c8fa7ead478 100644 --- a/tests/language_strong/malbounded_type_test2_test.dart +++ b/tests/language_strong/malbounded_type_test2_test.dart @@ -18,7 +18,7 @@ class A { } class B { test() { - new A() is A; // //# static type warning + new A() is A; // /// static type warning } } diff --git a/tests/language_strong/malbounded_type_test_test.dart b/tests/language_strong/malbounded_type_test_test.dart index 261fcbb3d82..ef4bacff799 100644 --- a/tests/language_strong/malbounded_type_test_test.dart +++ b/tests/language_strong/malbounded_type_test_test.dart @@ -5,15 +5,15 @@ import 'package:expect/expect.dart'; class Super {} -class Malbounded1 implements Super {} // //# 01: static type warning, dynamic type error -class Malbounded1 implements Super {} // //# 02: static type warning -class Malbounded2 extends Super {} // //# 03: static type warning, dynamic type error +class Malbounded1 implements Super {} // /// 01: static type warning, dynamic type error +class Malbounded1 implements Super {} // /// 02: static type warning +class Malbounded2 extends Super {} // /// 03: static type warning, dynamic type error main() { - var m = new Malbounded1(); // //# 01: continued - Expect.isFalse(m is Super); // //# 01: continued + var m = new Malbounded1(); // /// 01: continued + Expect.isFalse(m is Super); // /// 01: continued var s = new Super(); - Expect.isFalse(s is Malbounded1); // //# 02: continued - Expect.isFalse(s is Malbounded2); // //# 03: continued - Expect.isFalse(s is Super); // //# 04: static type warning, dynamic type error + Expect.isFalse(s is Malbounded1); // /// 02: continued + Expect.isFalse(s is Malbounded2); // /// 03: continued + Expect.isFalse(s is Super); // /// 04: static type warning, dynamic type error } diff --git a/tests/language_strong/malformed2_test.dart b/tests/language_strong/malformed2_test.dart index 1b263fa13c1..84011c49712 100644 --- a/tests/language_strong/malformed2_test.dart +++ b/tests/language_strong/malformed2_test.dart @@ -5,7 +5,7 @@ library malformed_test; // This part includes the actual tests. -part 'malformed2_lib.dart'; //# 00: static type warning +part 'malformed2_lib.dart'; /// 00: static type warning bool inCheckedMode() { try { @@ -49,11 +49,11 @@ test(bool expectTypeError, f(), [String message]) { } } -const Unresolved c1 = 0; //# 01: static type warning, checked mode compile-time error +const Unresolved c1 = 0; /// 01: static type warning, checked mode compile-time error void main() { - print(c1); //# 01: continued - testValue(new List()); //# 00: continued - testValue(null); //# 00: continued + print(c1); /// 01: continued + testValue(new List()); /// 00: continued + testValue(null); /// 00: continued checkFailures(); } diff --git a/tests/language_strong/malformed_bound_test.dart b/tests/language_strong/malformed_bound_test.dart index c1845ffb0d7..061c3b9453c 100644 --- a/tests/language_strong/malformed_bound_test.dart +++ b/tests/language_strong/malformed_bound_test.dart @@ -5,13 +5,13 @@ // Test that a malformed type variable bound is treated as dynamic. class C { - f(T t) => t.foo; //# 01: continued + f(T t) => t.foo; /// 01: continued } main() { new C() - .f(1) //# 01: continued + .f(1) /// 01: continued ; } diff --git a/tests/language_strong/malformed_inheritance_test.dart b/tests/language_strong/malformed_inheritance_test.dart index f55d8807a37..71eb1963dc7 100644 --- a/tests/language_strong/malformed_inheritance_test.dart +++ b/tests/language_strong/malformed_inheritance_test.dart @@ -10,25 +10,25 @@ import 'package:expect/expect.dart'; class A {} class C - extends Unresolved //# 01: compile-time error - extends A //# 02: static type warning - extends Object with Unresolved //# 03: compile-time error - extends Object with A //# 04: static type warning - implements Unresolved //# 05: compile-time error - implements A //# 06: static type warning - extends A //# 07: compile-time error - extends A //# 08: compile-time error - extends Object with A //# 09: compile-time error - extends Object with A //# 10: compile-time error - implements A //# 11: compile-time error - implements A //# 12: compile-time error + extends Unresolved /// 01: compile-time error + extends A /// 02: static type warning + extends Object with Unresolved /// 03: compile-time error + extends Object with A /// 04: static type warning + implements Unresolved /// 05: compile-time error + implements A /// 06: static type warning + extends A /// 07: compile-time error + extends A /// 08: compile-time error + extends Object with A /// 09: compile-time error + extends Object with A /// 10: compile-time error + implements A /// 11: compile-time error + implements A /// 12: compile-time error { } void main() { new C(); - Expect.isTrue(new C() is A && new C() is A); //# 02: continued - Expect.isTrue(new C() is A && new C() is A); //# 04: continued - Expect.isTrue(new C() is A && new C() is A); //# 06: continued + Expect.isTrue(new C() is A && new C() is A); /// 02: continued + Expect.isTrue(new C() is A && new C() is A); /// 04: continued + Expect.isTrue(new C() is A && new C() is A); /// 06: continued } \ No newline at end of file diff --git a/tests/language_strong/malformed_test.dart b/tests/language_strong/malformed_test.dart index 23ba383ef58..ca438686f14 100644 --- a/tests/language_strong/malformed_test.dart +++ b/tests/language_strong/malformed_test.dart @@ -76,7 +76,7 @@ void main() { checkAsListUnresolved(true, new List()); checkIsListDynamic(true, []); - checkIsListDynamic(true, <>[]); //# 01: compile-time error + checkIsListDynamic(true, <>[]); /// 01: compile-time error checkIsListDynamic(false, []); checkIsListDynamic(true, []); checkIsListDynamic(true, >[]); @@ -85,7 +85,7 @@ void main() { checkIsListDynamic(true, []); checkIsListDynamic(true, new List()); - checkIsListDynamic(true, new List<>()); //# 02: compile-time error + checkIsListDynamic(true, new List<>()); /// 02: compile-time error checkIsListDynamic(true, new List()); checkIsListDynamic(true, new List>()); checkIsListDynamic(true, new List()); @@ -94,7 +94,7 @@ void main() { checkIsMapDynamic(true, true, {}); checkIsMapDynamic(true, true, {}); - checkIsMapDynamic(true, true, <>{}); //# 03: compile-time error + checkIsMapDynamic(true, true, <>{}); /// 03: compile-time error checkIsMapDynamic(true, true, {}); checkIsMapDynamic(false, false, {}); checkIsMapDynamic(true, true, {}); @@ -104,7 +104,7 @@ void main() { checkIsMapDynamic(false, true, >{}); checkIsMapDynamic(true, true, new Map()); - checkIsMapDynamic(true, true, new Map<>); //# 04: compile-time error + checkIsMapDynamic(true, true, new Map<>); /// 04: compile-time error checkIsMapDynamic(true, true, new Map()); checkIsMapDynamic(false, false, new Map()); checkIsMapDynamic(true, true, new Map()); @@ -163,7 +163,7 @@ void main() { try { throw 'foo'; } - on undeclared_prefix.Unresolved // //# 06: runtime error + on undeclared_prefix.Unresolved // /// 06: runtime error catch (e) { } } \ No newline at end of file diff --git a/tests/language_strong/map_literal1_test.dart b/tests/language_strong/map_literal1_test.dart index 6e336f4916d..0305190321e 100644 --- a/tests/language_strong/map_literal1_test.dart +++ b/tests/language_strong/map_literal1_test.dart @@ -6,7 +6,7 @@ main() { var m = const - // //# 01: static type warning, checked mode compile-time error + // /// 01: static type warning, checked mode compile-time error {"a": 0}; } diff --git a/tests/language_strong/map_literal3_test.dart b/tests/language_strong/map_literal3_test.dart index f2f02a25860..3a11f76789c 100644 --- a/tests/language_strong/map_literal3_test.dart +++ b/tests/language_strong/map_literal3_test.dart @@ -63,17 +63,17 @@ class MapLiteralTest { Expect.equals(14, m.length); // Check that last value of duplicate key wins for const maps. - final cmap = const {"a": 10, "b": 100, "a": 1000}; //# static type warning + final cmap = const {"a": 10, "b": 100, "a": 1000}; /// static type warning Expect.equals(2, cmap.length); Expect.equals(1000, cmap["a"]); Expect.equals(100, cmap["b"]); - final cmap2 = const {"a": 10, "a": 100, "a": 1000}; //# static type warning + final cmap2 = const {"a": 10, "a": 100, "a": 1000}; /// static type warning Expect.equals(1, cmap2.length); Expect.equals(1000, cmap["a"]); // Check that last value of duplicate key wins for mutable maps. - var mmap = {"a": 10, "b": 100, "a": 1000}; //# static type warning + var mmap = {"a": 10, "b": 100, "a": 1000}; /// static type warning Expect.equals(2, mmap.length); Expect.equals(1000, mmap["a"]); @@ -83,7 +83,7 @@ class MapLiteralTest { // are still evaluated, including side effects. int counter = 0; int ctr() { counter += 10; return counter; } - mmap = {"a": ctr(), "b": ctr(), "a": ctr()}; //# static type warning + mmap = {"a": ctr(), "b": ctr(), "a": ctr()}; /// static type warning Expect.equals(2, mmap.length); Expect.equals(40, ctr()); Expect.equals(30, mmap["a"]); diff --git a/tests/language_strong/metadata_scope1_test.dart b/tests/language_strong/metadata_scope1_test.dart index 2acdf7f7bb8..7d23dcfe8ee 100644 --- a/tests/language_strong/metadata_scope1_test.dart +++ b/tests/language_strong/metadata_scope1_test.dart @@ -7,7 +7,7 @@ @deprecated typedef Foo - // //# 01: ok + // /// 01: ok (); main() { diff --git a/tests/language_strong/metadata_scope2_test.dart b/tests/language_strong/metadata_scope2_test.dart index 9b1ded66f9f..26c76737698 100644 --- a/tests/language_strong/metadata_scope2_test.dart +++ b/tests/language_strong/metadata_scope2_test.dart @@ -7,7 +7,7 @@ @deprecated class Foo - // //# 01: ok + // /// 01: ok {} main() { diff --git a/tests/language_strong/method_override2_test.dart b/tests/language_strong/method_override2_test.dart index f697efe7b8c..63eb4310dd8 100644 --- a/tests/language_strong/method_override2_test.dart +++ b/tests/language_strong/method_override2_test.dart @@ -11,7 +11,7 @@ abstract class I { abstract class J extends I { } abstract class K extends J { - m({c, d}); // //# 00: static type warning + m({c, d}); // /// 00: static type warning } class C implements I { @@ -21,9 +21,9 @@ class C implements I { } class D - extends C // //# 01: static type warning - implements I // //# 02: static type warning - implements J // //# 03: static type warning + extends C // /// 01: static type warning + implements I // /// 02: static type warning + implements J // /// 03: static type warning { m({c, d}) { print("$c $d"); diff --git a/tests/language_strong/method_override3_test.dart b/tests/language_strong/method_override3_test.dart index f4734810f65..9dfee735732 100644 --- a/tests/language_strong/method_override3_test.dart +++ b/tests/language_strong/method_override3_test.dart @@ -13,26 +13,26 @@ class A { class B extends A { foo(required1 - /* // //# 00: static type warning + /* // /// 00: static type warning , { named1: 499 } - */ // //# 00: static type warning + */ // /// 00: static type warning ) { return required1; } bar(required1, required2, { named1: 13 - /* // //# 01: static type warning + /* // /// 01: static type warning , named2: 17 - */ // //# 01: static type warning + */ // /// 01: static type warning }) { return required1 + required2 * 3 + named1 * 5; } gee({named2: 11 - /* // //# 02: static type warning + /* // /// 02: static type warning , named1: 31 - */ // //# 02: static type warning + */ // /// 02: static type warning }) { return named2 * 99; } diff --git a/tests/language_strong/method_override7_test.dart b/tests/language_strong/method_override7_test.dart index 78009e99287..18f8fc3ee68 100644 --- a/tests/language_strong/method_override7_test.dart +++ b/tests/language_strong/method_override7_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: static type warning + var foo = 42; // /// 00: compile-time error + get foo => 42; // /// 01: compile-time error + foo() => 42; // /// 02: compile-time error + set foo(value) { } // /// 03: static type warning } class B extends A { diff --git a/tests/language_strong/method_override8_test.dart b/tests/language_strong/method_override8_test.dart index f58c26694a2..53e6576d031 100644 --- a/tests/language_strong/method_override8_test.dart +++ b/tests/language_strong/method_override8_test.dart @@ -8,10 +8,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: ok - set foo(value) { } // //# 03: static type warning + var foo = 42; // /// 00: compile-time error + get foo => 42; // /// 01: compile-time error + foo() => 42; // /// 02: ok + set foo(value) { } // /// 03: static type warning } class B extends A { diff --git a/tests/language_strong/missing_const_constructor_test.dart b/tests/language_strong/missing_const_constructor_test.dart index 166c529099e..14b18d7b668 100644 --- a/tests/language_strong/missing_const_constructor_test.dart +++ b/tests/language_strong/missing_const_constructor_test.dart @@ -9,21 +9,21 @@ class GoodClass { } GoodClass GOOD_CLASS - = const GoodClass() //# 01: ok - = const GoodClass.BAD_NAME() //# 02: compile-time error - = const GoodClass("bad arg") //# 03: compile-time error + = const GoodClass() /// 01: ok + = const GoodClass.BAD_NAME() /// 02: compile-time error + = const GoodClass("bad arg") /// 03: compile-time error ; -const BadClass BAD_CLASS = const BadClass(); //# 04: compile-time error -BadClass BAD_CLASS = const BadClass(); //# 05: compile-time error +const BadClass BAD_CLASS = const BadClass(); /// 04: compile-time error +BadClass BAD_CLASS = const BadClass(); /// 05: compile-time error void main() { try { print(GOOD_CLASS); - print(BAD_CLASS); //# 04: continued - print(BAD_CLASS); //# 05: continued - print(const BadClass()); //# 06: compile-time error + print(BAD_CLASS); /// 04: continued + print(BAD_CLASS); /// 05: continued + print(const BadClass()); /// 06: compile-time error } catch (e) { } diff --git a/tests/language_strong/missing_part_of_tag_test.dart b/tests/language_strong/missing_part_of_tag_test.dart index 71589f1c0ab..ffb360cd148 100644 --- a/tests/language_strong/missing_part_of_tag_test.dart +++ b/tests/language_strong/missing_part_of_tag_test.dart @@ -6,6 +6,6 @@ library lib; -part 'missing_part_of_tag_part.dart'; //# 01: compile-time error +part 'missing_part_of_tag_part.dart'; /// 01: compile-time error void main() {} \ No newline at end of file diff --git a/tests/language_strong/mixin_black_listed_test.dart b/tests/language_strong/mixin_black_listed_test.dart index fc8eefec7be..c8a7c4894f3 100644 --- a/tests/language_strong/mixin_black_listed_test.dart +++ b/tests/language_strong/mixin_black_listed_test.dart @@ -10,33 +10,33 @@ class C {} class D {} class C1 extends Object -with String //# 01: compile-time error +with String /// 01: compile-time error {} class D1 extends Object with C -, Null //# 02: compile-time error +, Null /// 02: compile-time error {} class E1 extends Object with -int, //# 03: compile-time error +int, /// 03: compile-time error C {} class F1 extends Object with C -, double //# 04: compile-time error +, double /// 04: compile-time error , D {} -class C2 = Object with num; //# 05: compile-time error +class C2 = Object with num; /// 05: compile-time error class D2 = Object with C -, bool //# 06: compile-time error +, bool /// 06: compile-time error ; class E2 = Object with -String, //# 07: compile-time error +String, /// 07: compile-time error C; class F2 = Object with C, -dynamic, //# 08: compile-time error +dynamic, /// 08: compile-time error D; @@ -45,7 +45,7 @@ main() { Expect.isNotNull(new D1()); Expect.isNotNull(new E1()); Expect.isNotNull(new F1()); - Expect.isNotNull(new C2()); //# 05: continued + Expect.isNotNull(new C2()); /// 05: continued Expect.isNotNull(new D2()); Expect.isNotNull(new E2()); Expect.isNotNull(new F2()); diff --git a/tests/language_strong/mixin_cyclic_test.dart b/tests/language_strong/mixin_cyclic_test.dart index ba23aab4456..355a90300eb 100644 --- a/tests/language_strong/mixin_cyclic_test.dart +++ b/tests/language_strong/mixin_cyclic_test.dart @@ -10,13 +10,13 @@ class S {} class M {} class C1 = S with M; -class C2 = S with C2; //# 01: compile-time error +class C2 = S with C2; /// 01: compile-time error class C3 = S with M implements A; -class C4 = S with M implements C4; //# 02: compile-time error +class C4 = S with M implements C4; /// 02: compile-time error void main() { new C1(); - new C2(); //# 01: continued + new C2(); /// 01: continued new C3(); - new C4(); //# 02: continued + new C4(); /// 02: continued } diff --git a/tests/language_strong/mixin_forwarding_constructor4_test.dart b/tests/language_strong/mixin_forwarding_constructor4_test.dart index a1e5b2e1a77..6bf23ae4fa7 100644 --- a/tests/language_strong/mixin_forwarding_constructor4_test.dart +++ b/tests/language_strong/mixin_forwarding_constructor4_test.dart @@ -10,15 +10,15 @@ abstract class Mixin {} class Base { Base( - {x} // //# 01: compile-time error - {x} // //# 02: compile-time error - {x} // //# 03: compile-time error + {x} // /// 01: compile-time error + {x} // /// 02: compile-time error + {x} // /// 03: compile-time error ); } class C extends Base with Mixin { - C(); // //# 02: continued - C() : super(); //# 03: continued + C(); // /// 02: continued + C() : super(); /// 03: continued } main() { diff --git a/tests/language_strong/mixin_illegal_constructor_test.dart b/tests/language_strong/mixin_illegal_constructor_test.dart index d008f0810e9..7f54fa81fd2 100644 --- a/tests/language_strong/mixin_illegal_constructor_test.dart +++ b/tests/language_strong/mixin_illegal_constructor_test.dart @@ -16,40 +16,40 @@ class M2 { } class C0 = Object with M0; -class C1 = Object with M1; // //# 01: compile-time error -class C2 = Object with M2; // //# 02: compile-time error -class C3 = Object with M0, M1; // //# 03: compile-time error -class C4 = Object with M1, M0; // //# 04: compile-time error -class C5 = Object with M0, M2; // //# 05: compile-time error -class C6 = Object with M2, M0; // //# 06: compile-time error +class C1 = Object with M1; // /// 01: compile-time error +class C2 = Object with M2; // /// 02: compile-time error +class C3 = Object with M0, M1; // /// 03: compile-time error +class C4 = Object with M1, M0; // /// 04: compile-time error +class C5 = Object with M0, M2; // /// 05: compile-time error +class C6 = Object with M2, M0; // /// 06: compile-time error class D0 extends Object with M0 { } -class D1 extends Object with M1 { } // //# 07: compile-time error -class D2 extends Object with M2 { } // //# 08: compile-time error -class D3 extends Object with M0, M1 { } // //# 09: compile-time error -class D4 extends Object with M1, M0 { } // //# 10: compile-time error -class D5 extends Object with M0, M2 { } // //# 11: compile-time error -class D6 extends Object with M2, M0 { } // //# 12: compile-time error +class D1 extends Object with M1 { } // /// 07: compile-time error +class D2 extends Object with M2 { } // /// 08: compile-time error +class D3 extends Object with M0, M1 { } // /// 09: compile-time error +class D4 extends Object with M1, M0 { } // /// 10: compile-time error +class D5 extends Object with M0, M2 { } // /// 11: compile-time error +class D6 extends Object with M2, M0 { } // /// 12: compile-time error main() { new C0(); - new C1(); // //# 01: continued - new C2(); // //# 02: continued - new C3(); // //# 03: continued - new C4(); // //# 04: continued - new C5(); // //# 05: continued - new C6(); // //# 06: continued + new C1(); // /// 01: continued + new C2(); // /// 02: continued + new C3(); // /// 03: continued + new C4(); // /// 04: continued + new C5(); // /// 05: continued + new C6(); // /// 06: continued new D0(); - new D1(); // //# 07: continued - new D2(); // //# 08: continued - new D3(); // //# 09: continued - new D4(); // //# 10: continued - new D5(); // //# 11: continued - new D6(); // //# 12: continued + new D1(); // /// 07: continued + new D2(); // /// 08: continued + new D3(); // /// 09: continued + new D4(); // /// 10: continued + new D5(); // /// 11: continued + new D6(); // /// 12: continued - new C0(1,2,3); // //# 13: static type warning, runtime error - new C0.named(); // //# 14: static type warning, runtime error - new D0(1,2,3); // //# 15: static type warning, runtime error - new D0.named(); // //# 16: static type warning, runtime error + new C0(1,2,3); // /// 13: static type warning, runtime error + new C0.named(); // /// 14: static type warning, runtime error + new D0(1,2,3); // /// 15: static type warning, runtime error + new D0.named(); // /// 16: static type warning, runtime error } diff --git a/tests/language_strong/mixin_illegal_cycles_test.dart b/tests/language_strong/mixin_illegal_cycles_test.dart index 084aab25049..20358bbd1af 100644 --- a/tests/language_strong/mixin_illegal_cycles_test.dart +++ b/tests/language_strong/mixin_illegal_cycles_test.dart @@ -3,37 +3,37 @@ // BSD-style license that can be found in the LICENSE file. class M { } -class M0 extends Object with M0 { } // //# 01: compile-time error -class M1 = Object with M1; // //# 02: compile-time error +class M0 extends Object with M0 { } // /// 01: compile-time error +class M1 = Object with M1; // /// 02: compile-time error -class M2 = Object with M3; // //# 03: compile-time error -class M3 = Object with M2; // //# 03: continued +class M2 = Object with M3; // /// 03: compile-time error +class M3 = Object with M2; // /// 03: continued -class M4 = Object with M5; // //# 04: compile-time error -class M5 = Object with M6; // //# 04: continued -class M6 = Object with M4; // //# 04: continued +class M4 = Object with M5; // /// 04: compile-time error +class M5 = Object with M6; // /// 04: continued +class M6 = Object with M4; // /// 04: continued -class M7 extends Object with M8 { } // //# 05: compile-time error -class M8 extends Object with M7 { } // //# 05: continued +class M7 extends Object with M8 { } // /// 05: compile-time error +class M8 extends Object with M7 { } // /// 05: continued -class M9 = Object with M91; // //# 06: compile-time error -class M91 = Object with M92; // //# 06: continued -class M92 = Object with M91; // //# 06: continued +class M9 = Object with M91; // /// 06: compile-time error +class M91 = Object with M92; // /// 06: continued +class M92 = Object with M91; // /// 06: continued main() { - new M0(); // //# 01: continued + new M0(); // /// 01: continued - new M1(); // //# 02: continued + new M1(); // /// 02: continued - new M2(); // //# 03: continued - new M3(); // //# 03: continued + new M2(); // /// 03: continued + new M3(); // /// 03: continued - new M4(); // //# 04: continued - new M5(); // //# 04: continued - new M6(); // //# 04: continued + new M4(); // /// 04: continued + new M5(); // /// 04: continued + new M6(); // /// 04: continued - new M7(); // //# 05: continued - new M8(); // //# 05: continued + new M7(); // /// 05: continued + new M8(); // /// 05: continued - new M9(); // //# 06: continued + new M9(); // /// 06: continued } diff --git a/tests/language_strong/mixin_illegal_object_test.dart b/tests/language_strong/mixin_illegal_object_test.dart index a95bdfa0f42..fb2c0bd7c1b 100644 --- a/tests/language_strong/mixin_illegal_object_test.dart +++ b/tests/language_strong/mixin_illegal_object_test.dart @@ -7,12 +7,12 @@ class S { } class C0 extends S -with Object // //# 01: compile-time error +with Object // /// 01: compile-time error { } -class C1 = S with Object; // //# 02: compile-time error +class C1 = S with Object; // /// 02: compile-time error main() { new C0(); - new C1(); // //# 02: continued + new C1(); // /// 02: continued } diff --git a/tests/language_strong/mixin_illegal_super_use_test.dart b/tests/language_strong/mixin_illegal_super_use_test.dart index e633ad1e2b4..fb5d70d29a5 100644 --- a/tests/language_strong/mixin_illegal_super_use_test.dart +++ b/tests/language_strong/mixin_illegal_super_use_test.dart @@ -9,21 +9,21 @@ class M { class P0 { foo() { - super.toString(); // //# 01: compile-time error - super.foo(); // //# 02: compile-time error - super.bar = 100; // //# 03: compile-time error + super.toString(); // /// 01: compile-time error + super.foo(); // /// 02: compile-time error + super.bar = 100; // /// 03: compile-time error void inner() { - super.toString(); // //# 04: compile-time error - super.foo(); // //# 05: compile-time error - super.bar = 100; // //# 06: compile-time error + super.toString(); // /// 04: compile-time error + super.foo(); // /// 05: compile-time error + super.bar = 100; // /// 06: compile-time error } inner(); (() { - super.toString(); // //# 07: compile-time error - super.foo(); // //# 08: compile-time error - super.bar = 100; // //# 09: compile-time error + super.toString(); // /// 07: compile-time error + super.foo(); // /// 08: compile-time error + super.bar = 100; // /// 09: compile-time error })(); return 42; @@ -32,7 +32,7 @@ class P0 { class P1 { bar() { - super.toString(); // //# 10: compile-time error + super.toString(); // /// 10: compile-time error return 87; } @@ -52,7 +52,7 @@ class P1 { class P2 { baz() { - super.toString(); // //# 11: compile-time error + super.toString(); // /// 11: compile-time error return 99; } } diff --git a/tests/language_strong/mixin_illegal_superclass_test.dart b/tests/language_strong/mixin_illegal_superclass_test.dart index aac9c0bc19f..8424512a41e 100644 --- a/tests/language_strong/mixin_illegal_superclass_test.dart +++ b/tests/language_strong/mixin_illegal_superclass_test.dart @@ -12,110 +12,110 @@ class M2 extends M0 { } class C00 = S0 with M0; class C01 = S0 with M1; -class C02 = S0 with M2; // //# 01: compile-time error +class C02 = S0 with M2; // /// 01: compile-time error class C03 = S0 with M0, M1; -class C04 = S0 with M0, M2; // //# 02: compile-time error -class C05 = S0 with M2, M0; // //# 03: compile-time error -class C06 = S0 with M1, M2; // //# 04: compile-time error -class C07 = S0 with M2, M1; // //# 05: compile-time error +class C04 = S0 with M0, M2; // /// 02: compile-time error +class C05 = S0 with M2, M0; // /// 03: compile-time error +class C06 = S0 with M1, M2; // /// 04: compile-time error +class C07 = S0 with M2, M1; // /// 05: compile-time error class C10 = S1 with M0; class C11 = S1 with M1; -class C12 = S1 with M2; // //# 06: compile-time error +class C12 = S1 with M2; // /// 06: compile-time error class C13 = S1 with M0, M1; -class C14 = S1 with M0, M2; // //# 07: compile-time error -class C15 = S1 with M2, M0; // //# 08: compile-time error -class C16 = S1 with M1, M2; // //# 09: compile-time error -class C17 = S1 with M2, M1; // //# 10: compile-time error +class C14 = S1 with M0, M2; // /// 07: compile-time error +class C15 = S1 with M2, M0; // /// 08: compile-time error +class C16 = S1 with M1, M2; // /// 09: compile-time error +class C17 = S1 with M2, M1; // /// 10: compile-time error class C20 = S2 with M0; class C21 = S2 with M1; -class C22 = S2 with M2; // //# 11: compile-time error +class C22 = S2 with M2; // /// 11: compile-time error class C23 = S2 with M0, M1; -class C24 = S2 with M0, M2; // //# 12: compile-time error -class C25 = S2 with M2, M0; // //# 13: compile-time error -class C26 = S2 with M1, M2; // //# 14: compile-time error -class C27 = S2 with M2, M1; // //# 15: compile-time error +class C24 = S2 with M0, M2; // /// 12: compile-time error +class C25 = S2 with M2, M0; // /// 13: compile-time error +class C26 = S2 with M1, M2; // /// 14: compile-time error +class C27 = S2 with M2, M1; // /// 15: compile-time error class D00 extends S0 with M0 { } class D01 extends S0 with M1 { } -class D02 extends S0 with M2 { } // //# 16: compile-time error +class D02 extends S0 with M2 { } // /// 16: compile-time error class D03 extends S0 with M0, M1 { } -class D04 extends S0 with M0, M2 { } // //# 17: compile-time error -class D05 extends S0 with M2, M0 { } // //# 18: compile-time error -class D06 extends S0 with M1, M2 { } // //# 19: compile-time error -class D07 extends S0 with M2, M1 { } // //# 20: compile-time error +class D04 extends S0 with M0, M2 { } // /// 17: compile-time error +class D05 extends S0 with M2, M0 { } // /// 18: compile-time error +class D06 extends S0 with M1, M2 { } // /// 19: compile-time error +class D07 extends S0 with M2, M1 { } // /// 20: compile-time error class D10 extends S1 with M0 { } class D11 extends S1 with M1 { } -class D12 extends S1 with M2 { } // //# 21: compile-time error +class D12 extends S1 with M2 { } // /// 21: compile-time error class D13 extends S1 with M0, M1 { } -class D14 extends S1 with M0, M2 { } // //# 22: compile-time error -class D15 extends S1 with M2, M0 { } // //# 23: compile-time error -class D16 extends S1 with M1, M2 { } // //# 24: compile-time error -class D17 extends S1 with M2, M1 { } // //# 25: compile-time error +class D14 extends S1 with M0, M2 { } // /// 22: compile-time error +class D15 extends S1 with M2, M0 { } // /// 23: compile-time error +class D16 extends S1 with M1, M2 { } // /// 24: compile-time error +class D17 extends S1 with M2, M1 { } // /// 25: compile-time error class D20 extends S2 with M0 { } class D21 extends S2 with M1 { } -class D22 extends S2 with M2 { } // //# 26: compile-time error +class D22 extends S2 with M2 { } // /// 26: compile-time error class D23 extends S2 with M0, M1 { } -class D24 extends S2 with M0, M2 { } // //# 27: compile-time error -class D25 extends S2 with M2, M0 { } // //# 28: compile-time error -class D26 extends S2 with M1, M2 { } // //# 29: compile-time error -class D27 extends S2 with M2, M1 { } // //# 30: compile-time error +class D24 extends S2 with M0, M2 { } // /// 27: compile-time error +class D25 extends S2 with M2, M0 { } // /// 28: compile-time error +class D26 extends S2 with M1, M2 { } // /// 29: compile-time error +class D27 extends S2 with M2, M1 { } // /// 30: compile-time error main() { new C00(); new C01(); - new C02(); // //# 01: continued + new C02(); // /// 01: continued new C03(); - new C04(); // //# 02: continued - new C05(); // //# 03: continued - new C06(); // //# 04: continued - new C07(); // //# 05: continued + new C04(); // /// 02: continued + new C05(); // /// 03: continued + new C06(); // /// 04: continued + new C07(); // /// 05: continued new C10(); new C11(); - new C12(); // //# 06: continued + new C12(); // /// 06: continued new C13(); - new C14(); // //# 07: continued - new C15(); // //# 08: continued - new C16(); // //# 09: continued - new C17(); // //# 10: continued + new C14(); // /// 07: continued + new C15(); // /// 08: continued + new C16(); // /// 09: continued + new C17(); // /// 10: continued new C20(); new C21(); - new C22(); // //# 11: continued + new C22(); // /// 11: continued new C23(); - new C24(); // //# 12: continued - new C25(); // //# 13: continued - new C26(); // //# 14: continued - new C27(); // //# 15: continued + new C24(); // /// 12: continued + new C25(); // /// 13: continued + new C26(); // /// 14: continued + new C27(); // /// 15: continued new D00(); new D01(); - new D02(); // //# 16: continued + new D02(); // /// 16: continued new D03(); - new D04(); // //# 17: continued - new D05(); // //# 18: continued - new D06(); // //# 19: continued - new D07(); // //# 20: continued + new D04(); // /// 17: continued + new D05(); // /// 18: continued + new D06(); // /// 19: continued + new D07(); // /// 20: continued new D10(); new D11(); - new D12(); // //# 21: continued + new D12(); // /// 21: continued new D13(); - new D14(); // //# 22: continued - new D15(); // //# 23: continued - new D16(); // //# 24: continued - new D17(); // //# 25: continued + new D14(); // /// 22: continued + new D15(); // /// 23: continued + new D16(); // /// 24: continued + new D17(); // /// 25: continued new D20(); new D21(); - new D22(); // //# 26: continued + new D22(); // /// 26: continued new D23(); - new D24(); // //# 27: continued - new D25(); // //# 28: continued - new D26(); // //# 29: continued - new D27(); // //# 30: continued + new D24(); // /// 27: continued + new D25(); // /// 28: continued + new D26(); // /// 29: continued + new D27(); // /// 30: continued } diff --git a/tests/language_strong/mixin_illegal_syntax_test.dart b/tests/language_strong/mixin_illegal_syntax_test.dart index 4ae4ad507a3..e71fd4b2308 100644 --- a/tests/language_strong/mixin_illegal_syntax_test.dart +++ b/tests/language_strong/mixin_illegal_syntax_test.dart @@ -8,52 +8,52 @@ class M { } typedef T0 = abstract S with M; abstract class T0A = S with M; -class T1 = final S with M; // //# 01: compile-time error -class T2 = var S with M; // //# 02: compile-time error -class T3 = const S with M; // //# 03: compile-time error -class T4 = static S with M; // //# 04: compile-time error -class T5 = external S with M; // //# 05: compile-time error +class T1 = final S with M; // /// 01: compile-time error +class T2 = var S with M; // /// 02: compile-time error +class T3 = const S with M; // /// 03: compile-time error +class T4 = static S with M; // /// 04: compile-time error +class T5 = external S with M; // /// 05: compile-time error class T6 = G with M; class T7 = G> with M; -class C0 extends abstract S with M { } // //# 06: compile-time error -class C1 extends final S with M { } // //# 07: compile-time error -class C2 extends var S with M { } // //# 08: compile-time error -class C3 extends const S with M { } // //# 09: compile-time error -class C4 extends static S with M { } // //# 10: compile-time error -class C5 extends external S with M { } // //# 11: compile-time error +class C0 extends abstract S with M { } // /// 06: compile-time error +class C1 extends final S with M { } // /// 07: compile-time error +class C2 extends var S with M { } // /// 08: compile-time error +class C3 extends const S with M { } // /// 09: compile-time error +class C4 extends static S with M { } // /// 10: compile-time error +class C5 extends external S with M { } // /// 11: compile-time error class C6 extends G with M { } class C7 extends G> with M { } class D0 extends S with M - implements M // //# 12: compile-time error + implements M // /// 12: compile-time error implements M { } class D1 extends T0 { } -class X = S; // //# 14: compile-time error +class X = S; // /// 14: compile-time error main() { - new T0(); // //# 13: static type warning, runtime error - new T0A(); // //# 13: static type warning, runtime error - new T1(); // //# 01: continued - new T2(); // //# 02: continued - new T3(); // //# 03: continued - new T4(); // //# 04: continued - new T5(); // //# 05: continued + new T0(); // /// 13: static type warning, runtime error + new T0A(); // /// 13: static type warning, runtime error + new T1(); // /// 01: continued + new T2(); // /// 02: continued + new T3(); // /// 03: continued + new T4(); // /// 04: continued + new T5(); // /// 05: continued new T6(); new T7(); - new C0(); // //# 06: continued - new C1(); // //# 07: continued - new C2(); // //# 08: continued - new C3(); // //# 09: continued - new C4(); // //# 10: continued - new C5(); // //# 11: continued + new C0(); // /// 06: continued + new C1(); // /// 07: continued + new C2(); // /// 08: continued + new C3(); // /// 09: continued + new C4(); // /// 10: continued + new C5(); // /// 11: continued new C6(); new C7(); - new D0(); // //# 12: continued + new D0(); // /// 12: continued new D1(); - new X(); // //# 14: continued + new X(); // /// 14: continued } diff --git a/tests/language_strong/mixin_invalid_bound2_test.dart b/tests/language_strong/mixin_invalid_bound2_test.dart index d1dcbcaec7a..7e633c66a4f 100644 --- a/tests/language_strong/mixin_invalid_bound2_test.dart +++ b/tests/language_strong/mixin_invalid_bound2_test.dart @@ -22,19 +22,19 @@ class D extends S with M { } class E extends S with M { } main() { - new A(); // //# 01: static type warning - new A(); // //# 02: static type warning, dynamic type error - new A(); // //# 03: static type warning, dynamic type error - new B(); // //# 04: static type warning - new B(); // //# 05: static type warning, dynamic type error - new B(); // //# 06: static type warning, dynamic type error - new C(); // //# 07: static type warning - new C(); // //# 08: static type warning, dynamic type error - new C(); // //# 09: static type warning, dynamic type error - new D(); // //# 10: static type warning, dynamic type error - new D(); // //# 11: static type warning, dynamic type error - new D(); // //# 12: static type warning, dynamic type error - new E(); // //# 12: static type warning, dynamic type error - new E(); // //# 13: static type warning, dynamic type error - new E(); // //# 14: static type warning, dynamic type error + new A(); // /// 01: static type warning + new A(); // /// 02: static type warning, dynamic type error + new A(); // /// 03: static type warning, dynamic type error + new B(); // /// 04: static type warning + new B(); // /// 05: static type warning, dynamic type error + new B(); // /// 06: static type warning, dynamic type error + new C(); // /// 07: static type warning + new C(); // /// 08: static type warning, dynamic type error + new C(); // /// 09: static type warning, dynamic type error + new D(); // /// 10: static type warning, dynamic type error + new D(); // /// 11: static type warning, dynamic type error + new D(); // /// 12: static type warning, dynamic type error + new E(); // /// 12: static type warning, dynamic type error + new E(); // /// 13: static type warning, dynamic type error + new E(); // /// 14: static type warning, dynamic type error } diff --git a/tests/language_strong/mixin_invalid_bound_test.dart b/tests/language_strong/mixin_invalid_bound_test.dart index 72f6af4fbd4..f0288e949f5 100644 --- a/tests/language_strong/mixin_invalid_bound_test.dart +++ b/tests/language_strong/mixin_invalid_bound_test.dart @@ -22,14 +22,14 @@ class D extends S with M { } class E extends S with M { } main() { - new A(); // //# 01: static type warning - new A(); // //# 02: static type warning, dynamic type error - new B(); // //# 03: static type warning - new B(); // //# 04: static type warning, dynamic type error - new C(); // //# 05: static type warning - new C(); // //# 06: static type warning, dynamic type error - new D(); // //# 07: static type warning, dynamic type error - new D(); // //# 08: static type warning, dynamic type error - new E(); // //# 09: static type warning, dynamic type error - new E(); // //# 10: static type warning, dynamic type error + new A(); // /// 01: static type warning + new A(); // /// 02: static type warning, dynamic type error + new B(); // /// 03: static type warning + new B(); // /// 04: static type warning, dynamic type error + new C(); // /// 05: static type warning + new C(); // /// 06: static type warning, dynamic type error + new D(); // /// 07: static type warning, dynamic type error + new D(); // /// 08: static type warning, dynamic type error + new E(); // /// 09: static type warning, dynamic type error + new E(); // /// 10: static type warning, dynamic type error } diff --git a/tests/language_strong/mixin_invalid_inheritance1_test.dart b/tests/language_strong/mixin_invalid_inheritance1_test.dart index ab30e92c918..2497c86db88 100644 --- a/tests/language_strong/mixin_invalid_inheritance1_test.dart +++ b/tests/language_strong/mixin_invalid_inheritance1_test.dart @@ -3,9 +3,9 @@ // BSD-style license that can be found in the LICENSE file. class C extends Object - with Malformed // //# 01: compile-time error - with T // //# 02: compile-time error - with T // //# 03: compile-time error + with Malformed // /// 01: compile-time error + with T // /// 02: compile-time error + with T // /// 03: compile-time error {} main() => new C(); diff --git a/tests/language_strong/mixin_invalid_inheritance2_test.dart b/tests/language_strong/mixin_invalid_inheritance2_test.dart index 9edca961595..fa1380a9b79 100644 --- a/tests/language_strong/mixin_invalid_inheritance2_test.dart +++ b/tests/language_strong/mixin_invalid_inheritance2_test.dart @@ -2,12 +2,12 @@ // 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. -class C = Object with Malformed; // //# 01: compile-time error -class C = Object with T; // //# 02: compile-time error -class C = OBject with T; // //# 03: compile-time error +class C = Object with Malformed; // /// 01: compile-time error +class C = Object with T; // /// 02: compile-time error +class C = OBject with T; // /// 03: compile-time error main() { - new C(); // //# 01: continued - new C(); // //# 02: continued - new C(); // //# 03: continued + new C(); // /// 01: continued + new C(); // /// 02: continued + new C(); // /// 03: continued } \ No newline at end of file diff --git a/tests/language_strong/mixin_super_bound2_test.dart b/tests/language_strong/mixin_super_bound2_test.dart index f22fff687dc..87e8b7ab22d 100644 --- a/tests/language_strong/mixin_super_bound2_test.dart +++ b/tests/language_strong/mixin_super_bound2_test.dart @@ -16,19 +16,19 @@ bool inCheckedMode() { } class MS { } class M extends MS { } class NS { } class N extends NS { } class S { } @@ -51,7 +51,7 @@ main() { new MNA3(); new MNA4(); bool shouldThrow = false - || inCheckedMode() //# 01: continued + || inCheckedMode() /// 01: continued ; if (shouldThrow) { // Type parameter U of M must extend type parameter V, but diff --git a/tests/language_strong/mixin_super_constructor_named_test.dart b/tests/language_strong/mixin_super_constructor_named_test.dart index a6ec85a701e..998f5fb1bc8 100644 --- a/tests/language_strong/mixin_super_constructor_named_test.dart +++ b/tests/language_strong/mixin_super_constructor_named_test.dart @@ -7,7 +7,7 @@ import "package:expect/expect.dart"; class Base { int i, j; Base.ctor(int this.i - , {int this.j: 10} // //# 01: compile-time error + , {int this.j: 10} // /// 01: compile-time error ) { if (j == null) { j = 10; @@ -24,12 +24,12 @@ abstract class M { class C extends Base with M { int l = 131; - C.foo() : super.ctor(1, j: 13); //# 01: compile-time error + C.foo() : super.ctor(1, j: 13); /// 01: compile-time error C.bar() : super.ctor(1); } main() { - C c1 = new C.foo(); // //# 01: compile-time error + C c1 = new C.foo(); // /// 01: compile-time error C c2 = new C.bar(); Expect.equals(1, c2.i); Expect.equals(10, c2.j); diff --git a/tests/language_strong/mixin_super_constructor_positionals_test.dart b/tests/language_strong/mixin_super_constructor_positionals_test.dart index 6aad3c659c8..78b44bb8980 100644 --- a/tests/language_strong/mixin_super_constructor_positionals_test.dart +++ b/tests/language_strong/mixin_super_constructor_positionals_test.dart @@ -7,9 +7,9 @@ import "package:expect/expect.dart"; class Base { int i, j; Base.ctor(int this.i, - [ // //# 01: compile-time error + [ // /// 01: compile-time error int this.j - ] // //# 01: continued + ] // /// 01: continued ); } @@ -23,7 +23,7 @@ abstract class M { class C extends Base with M { int l = 131; C.foo() : super.ctor(1, 13); - C.bar() : super.ctor(1); // //# 01: continued + C.bar() : super.ctor(1); // /// 01: continued } main() { @@ -33,5 +33,5 @@ main() { Expect.equals(14, c1.foo()); Expect.equals(42, c1.k); Expect.equals(131, c1.l); - C c2 = new C.bar(); // //# 01: continued + C c2 = new C.bar(); // /// 01: continued } diff --git a/tests/language_strong/mixin_type_parameters_errors_test.dart b/tests/language_strong/mixin_type_parameters_errors_test.dart index 3a1692021ac..f8ae1399b6c 100644 --- a/tests/language_strong/mixin_type_parameters_errors_test.dart +++ b/tests/language_strong/mixin_type_parameters_errors_test.dart @@ -6,17 +6,17 @@ class S { } class M { } class A extends S with M { } -class B extends S with M { } // //# 01: static type warning -class C extends S with M { } // //# 02: static type warning +class B extends S with M { } // /// 01: static type warning +class C extends S with M { } // /// 02: static type warning class F = S with M; -class G = S with M; // //# 05: static type warning +class G = S with M; // /// 05: static type warning main() { var a; a = new A(); a = new A(); - a = new A(); // //# 03: static type warning + a = new A(); // /// 03: static type warning a = new F(); - a = new F(); // //# 04: static type warning + a = new F(); // /// 04: static type warning } diff --git a/tests/language_strong/mixin_type_variable_test.dart b/tests/language_strong/mixin_type_variable_test.dart index 971b464118f..4d5c6c4bea3 100644 --- a/tests/language_strong/mixin_type_variable_test.dart +++ b/tests/language_strong/mixin_type_variable_test.dart @@ -10,23 +10,23 @@ class A { class B = Object with A; -class C extends B {} //# 03: ok -class D extends B {} //# 04: ok +class C extends B {} /// 03: ok +class D extends B {} /// 04: ok class E = Object with A; -class F extends E {} //# 06: ok +class F extends E {} /// 06: ok -class G extends Object with A {} //# 07: ok -class H extends Object with A {} //# 08: ok +class G extends Object with A {} /// 07: ok +class H extends Object with A {} /// 08: ok void main() { - new A(); //# 01: ok - new B(); //# 02: ok - new C(); //# 03: continued - new D(); //# 04: continued - new E(); //# 05: ok - new F(); //# 06: continued - new G(); //# 07: continued - new H(); //# 08: continued + new A(); /// 01: ok + new B(); /// 02: ok + new C(); /// 03: continued + new D(); /// 04: continued + new E(); /// 05: ok + new F(); /// 06: continued + new G(); /// 07: continued + new H(); /// 08: continued } \ No newline at end of file diff --git a/tests/language_strong/multiline_newline_test.dart b/tests/language_strong/multiline_newline_test.dart index 1c69440ce48..e081e90bf86 100644 --- a/tests/language_strong/multiline_newline_test.dart +++ b/tests/language_strong/multiline_newline_test.dart @@ -32,14 +32,14 @@ main() { Expect.isTrue(c2); Expect.isTrue(c3); - const c4 = c1 ? 1 : 2; // //# 01: ok - Expect.equals(1, c4); // //# 01: continued + const c4 = c1 ? 1 : 2; // /// 01: ok + Expect.equals(1, c4); // /// 01: continued - const c5 = c2 ? 2 : 3; // //# 02: ok - Expect.equals(2, c5); // //# 02: continued + const c5 = c2 ? 2 : 3; // /// 02: ok + Expect.equals(2, c5); // /// 02: continued - const c6 = c3 ? 3 : 4; // //# 03: ok - Expect.equals(3, c6); // //# 03: continued + const c6 = c3 ? 3 : 4; // /// 03: ok + Expect.equals(3, c6); // /// 03: continued const c7 = cr.constantMultilineString != crlf.constantMultilineString ? true : null; @@ -51,7 +51,7 @@ main() { Expect.isNull(c8); Expect.isNull(c9); - const c10 = c7 ? 1 : 2; // //# 04: compile-time error - const c11 = c8 ? 2 : 3; // //# 05: compile-time error - const c12 = c9 ? 3 : 4; // //# 06: compile-time error + const c10 = c7 ? 1 : 2; // /// 04: compile-time error + const c11 = c8 ? 2 : 3; // /// 05: compile-time error + const c12 = c9 ? 3 : 4; // /// 06: compile-time error } \ No newline at end of file diff --git a/tests/language_strong/named_constructor_test.dart b/tests/language_strong/named_constructor_test.dart index 2e6b9a41edc..6db3929f504 100644 --- a/tests/language_strong/named_constructor_test.dart +++ b/tests/language_strong/named_constructor_test.dart @@ -20,30 +20,30 @@ void main() { Expect.equals(1, new Class.named().value); Expect.equals(1, new Class.named().value); // 'Class.named' is not a type: - Expect.equals(1, new Class.named().value); //# 01: runtime error + Expect.equals(1, new Class.named().value); /// 01: runtime error // 'Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(1, new Class.named().value); //# 02: compile-time error + Expect.equals(1, new Class.named().value); /// 02: compile-time error Expect.equals(2, new prefix.Class().value); // 'prefix' is not a type: - Expect.equals(2, new prefix.Class().value); //# 03: runtime error + Expect.equals(2, new prefix.Class().value); /// 03: runtime error Expect.equals(2, new prefix.Class().value); // 'prefix.Class' doesn't fit the grammar syntax T.id: - Expect.equals(2, new prefix.Class().value); //# 04: compile-time error + Expect.equals(2, new prefix.Class().value); /// 04: compile-time error Expect.equals(3, new prefix.Class.named().value); // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 05: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 05: compile-time error // 'prefix.Class.named' doesn't fit the grammar syntax T.id: Expect.equals(3, new prefix.Class.named().value); // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 06: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 06: compile-time error // 'prefix.Class' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 07: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 07: compile-time error // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 08: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 08: compile-time error // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 09: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 09: compile-time error // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - Expect.equals(3, new prefix.Class.named().value); //# 10: compile-time error + Expect.equals(3, new prefix.Class.named().value); /// 10: compile-time error } \ No newline at end of file diff --git a/tests/language_strong/named_parameters2_test.dart b/tests/language_strong/named_parameters2_test.dart index 0de47e8f2f3..8c8bd8af4ed 100644 --- a/tests/language_strong/named_parameters2_test.dart +++ b/tests/language_strong/named_parameters2_test.dart @@ -14,7 +14,7 @@ main() { bool foundError = false; try { // Parameter b passed twice, as positional and named. - test(10, 25, b: 26); // //# static type warning + test(10, 25, b: 26); // /// static type warning } on NoSuchMethodError catch (e) { foundError = true; } diff --git a/tests/language_strong/named_parameters_aggregated_test.dart b/tests/language_strong/named_parameters_aggregated_test.dart index 7ff998561f0..4926c29a9d9 100644 --- a/tests/language_strong/named_parameters_aggregated_test.dart +++ b/tests/language_strong/named_parameters_aggregated_test.dart @@ -11,7 +11,7 @@ class TypeTester {} // Expect compile-time error as no default values are allowed // in closure type definitions. typedef void Callback([String msg - = "" // //# 01: compile-time error + = "" // /// 01: compile-time error ]); class NamedParametersAggregatedTests { @@ -21,7 +21,7 @@ class NamedParametersAggregatedTests { } static int f_missing_comma(a - [b = 42] //# 02: compile-time error + [b = 42] /// 02: compile-time error ) => a; var _handler = null; @@ -29,7 +29,7 @@ class NamedParametersAggregatedTests { // Expect compile-time error as no default values // are allowed in closure type. void InstallCallback(void cb({String msg - : null //# 03: compile-time error + : null /// 03: compile-time error })) { _handler = cb; } @@ -40,16 +40,16 @@ class NamedParametersAggregatedTests { main() { // Expect compile-time error due to missing comma in function definition. NamedParametersAggregatedTests.f_missing_comma(10 - , 25 // //# 02: continued + , 25 // /// 02: continued ); // Expect compile-time erorr due to duplicate named argument. NamedParametersAggregatedTests.F31(10, b:25 - , b:35 // //# 04: compile-time error + , b:35 // /// 04: compile-time error ); // Expect compile-time error due to missing positional argument. - Expect.throws(() => NamedParametersAggregatedTests.F31(b:25, c:35), (e) => e is NoSuchMethodError); // //# 05: static type warning + Expect.throws(() => NamedParametersAggregatedTests.F31(b:25, c:35), (e) => e is NoSuchMethodError); // /// 05: static type warning new TypeTester(); diff --git a/tests/language_strong/named_parameters_test.dart b/tests/language_strong/named_parameters_test.dart index 29cc02317d2..2cf2ef24b55 100644 --- a/tests/language_strong/named_parameters_test.dart +++ b/tests/language_strong/named_parameters_test.dart @@ -66,28 +66,28 @@ class NamedParametersTest { Expect.equals(20, np.f21()); Expect.equals(20, F10(20)); Expect.equals(20, np.f21(20)); - Expect.equals(20, F10(b:20)); // //# 01: runtime error - Expect.equals(20, np.f21(b:20)); // //# 02: runtime error + Expect.equals(20, F10(b:20)); // /// 01: runtime error + Expect.equals(20, np.f21(b:20)); // /// 02: runtime error Expect.equals(1020, F21(10)); Expect.equals(1020, np.f32(10)); Expect.equals(1025, F21(10, 25)); Expect.equals(1025, np.f32(10, 25)); - Expect.equals(1025, F21(10, b:25)); // //# 03: runtime error - Expect.equals(1025, np.f32(10, b:25)); // //# 04: runtime error + Expect.equals(1025, F21(10, b:25)); // /// 03: runtime error + Expect.equals(1025, np.f32(10, b:25)); // /// 04: runtime error Expect.equals(102030, F31(10)); Expect.equals(102030, np.f42(10)); Expect.equals(102530, F31(10, 25)); Expect.equals(102530, np.f42(10, 25)); - Expect.equals(102035, F31(10, c:35)); // //# 05: runtime error - Expect.equals(102035, np.f42(10, c:35)); // //# 06: runtime error + Expect.equals(102035, F31(10, c:35)); // /// 05: runtime error + Expect.equals(102035, np.f42(10, c:35)); // /// 06: runtime error Expect.equals(102535, F31(10, 25, 35)); Expect.equals(102535, np.f42(10, 25, 35)); - Expect.equals(102535, F31(10, 25, c:35)); // //# 07: runtime error - Expect.equals(102535, np.f42(10, 25, c:35)); // //# 08: runtime error + Expect.equals(102535, F31(10, 25, c:35)); // /// 07: runtime error + Expect.equals(102535, np.f42(10, 25, c:35)); // /// 08: runtime error Expect.equals(10200040, F41(10)); Expect.equals(10200040, np.f52(10)); - Expect.equals(10203540, F41(10, c:35)); // //# 09: runtime error - Expect.equals(10203540, np.f52(10, c:35)); // //# 10: runtime error + Expect.equals(10203540, F41(10, c:35)); // /// 09: runtime error + Expect.equals(10203540, np.f52(10, c:35)); // /// 10: runtime error } } diff --git a/tests/language_strong/named_parameters_type_test.dart b/tests/language_strong/named_parameters_type_test.dart index 21c7e2a5e7d..e8c4b57b98d 100644 --- a/tests/language_strong/named_parameters_type_test.dart +++ b/tests/language_strong/named_parameters_type_test.dart @@ -17,7 +17,7 @@ main() { anyFunction = funNumOptBool; anyFunction = funNumOptBoolX; acceptFunNumOptBool(funNumOptBool); - acceptFunNumOptBool(funNum); // //# 01: runtime error - acceptFunNumOptBool(funNumBool); // //# 02: static type warning, runtime error - acceptFunNumOptBool(funNumOptBoolX); // //# 03: static type warning, runtime error + acceptFunNumOptBool(funNum); // /// 01: runtime error + acceptFunNumOptBool(funNumBool); // /// 02: static type warning, runtime error + acceptFunNumOptBool(funNumOptBoolX); // /// 03: static type warning, runtime error } diff --git a/tests/language_strong/new_expression_type_args_test.dart b/tests/language_strong/new_expression_type_args_test.dart index f4424fcdd03..60c80325552 100644 --- a/tests/language_strong/new_expression_type_args_test.dart +++ b/tests/language_strong/new_expression_type_args_test.dart @@ -5,18 +5,18 @@ // Tests showing errors using type-arguments in new expressions: class A { // Can't instantiate type parameter (within static or instance method). - m1() => new T(); // //# 00: static type warning, runtime error - static m2() => new T(); // //# 01: static type warning, runtime error + m1() => new T(); // /// 00: static type warning, runtime error + static m2() => new T(); // /// 01: static type warning, runtime error // OK when used within instance method, but not in static method. m3() => new A(); - static m4() => new A(); //# 02: static type warning + static m4() => new A(); /// 02: static type warning } main() { A a = new A(); - a.m1(); //# 00: continued - A.m2(); //# 01: continued + a.m1(); /// 00: continued + A.m2(); /// 01: continued a.m3(); - A.m4(); //# 02: continued + A.m4(); /// 02: continued } diff --git a/tests/language_strong/new_prefix_test.dart b/tests/language_strong/new_prefix_test.dart index 7b6d58f8c6c..0988b90e5d1 100644 --- a/tests/language_strong/new_prefix_test.dart +++ b/tests/language_strong/new_prefix_test.dart @@ -5,5 +5,5 @@ import 'dart:core' as prefix; main() { - return new prefix(); //# 01: static type warning, runtime error + return new prefix(); /// 01: static type warning, runtime error } diff --git a/tests/language_strong/no_main_test.dart b/tests/language_strong/no_main_test.dart index 0700b65c53e..24e5b37118b 100644 --- a/tests/language_strong/no_main_test.dart +++ b/tests/language_strong/no_main_test.dart @@ -2,6 +2,6 @@ // 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. -/* //# 01: static type warning, runtime error +/* /// 01: static type warning, runtime error main() {} -*/ //# 01: continued +*/ /// 01: continued diff --git a/tests/language_strong/no_such_constructor_test.dart b/tests/language_strong/no_such_constructor_test.dart index 3c4c7a9b6c6..40ade749107 100644 --- a/tests/language_strong/no_such_constructor_test.dart +++ b/tests/language_strong/no_such_constructor_test.dart @@ -9,5 +9,5 @@ class A { } main() { - new A(42); //# 01: static type warning, runtime error + new A(42); /// 01: static type warning, runtime error } diff --git a/tests/language_strong/not_enough_positional_arguments_test.dart b/tests/language_strong/not_enough_positional_arguments_test.dart index 33cffcd1046..ea50a09702c 100644 --- a/tests/language_strong/not_enough_positional_arguments_test.dart +++ b/tests/language_strong/not_enough_positional_arguments_test.dart @@ -15,13 +15,13 @@ class A { class B { B() - : super.test(b: 1) // //# 01: runtime error + : super.test(b: 1) // /// 01: runtime error ; } class C extends A { C() - : super.test(b: 1) // //# 02: runtime error + : super.test(b: 1) // /// 02: runtime error ; } @@ -32,16 +32,16 @@ class D { class E extends D { E() - : super.test(b: 1) // //# 05: runtime error + : super.test(b: 1) // /// 05: runtime error ; } main() { - new A.test(b: 1); // //# 00: runtime error + new A.test(b: 1); // /// 00: runtime error new B(); new C(); - new D.test(b: 1); // //# 03: runtime error + new D.test(b: 1); // /// 03: runtime error new E(); - foo(b: 1); // //# 06: runtime error - bar(b: 1); // //# 07: runtime error + foo(b: 1); // /// 06: runtime error + bar(b: 1); // /// 07: runtime error } diff --git a/tests/language_strong/null_test.dart b/tests/language_strong/null_test.dart index 6315395b112..f7d6cf43f1a 100644 --- a/tests/language_strong/null_test.dart +++ b/tests/language_strong/null_test.dart @@ -9,9 +9,9 @@ import "dart:mirrors"; import "package:expect/expect.dart"; class BadInherit - extends Null // //# 01: compile-time error - implements Null // //# 02: compile-time error - extends Object with Null // //# 03: compile-time error + extends Null // /// 01: compile-time error + implements Null // /// 02: compile-time error + extends Object with Null // /// 03: compile-time error {} class EqualsNotCalled { diff --git a/tests/language_strong/number_identifier_test.dart b/tests/language_strong/number_identifier_test.dart index 1279328d1f7..b4178c09d78 100644 --- a/tests/language_strong/number_identifier_test.dart +++ b/tests/language_strong/number_identifier_test.dart @@ -13,8 +13,8 @@ main() { Expect.isTrue(0x10is int); Expect.isTrue(-0x10is int); // "a" will be part of hex literal, the following "s" is an error. - 0x10as int; // //# 01: compile-time error - 0x; // //# 04: compile-time error + 0x10as int; // /// 01: compile-time error + 0x; // /// 04: compile-time error // Double literals. Expect.isTrue(2.0is double); @@ -29,16 +29,16 @@ main() { Expect.equals(1e-2, 1e-2as double); Expect.isTrue(1e+2is double); Expect.equals(1e+2, 1e+2as double); - Expect.throws(() => 1.e+2, // //# 05: ok - (e) => e is NoSuchMethodError); // //# 05: continued - 1d; // //# 06: compile-time error - 1D; // //# 07: compile-time error - Expect.throws(() => 1.d+2, // //# 08: ok - (e) => e is NoSuchMethodError); // //# 08: continued - Expect.throws(() => 1.D+2, // //# 09: ok - (e) => e is NoSuchMethodError); // //# 09: continued - 1.1d; // //# 10: compile-time error - 1.1D; // //# 11: compile-time error - 1e; // //# 02: compile-time error - 1x; // //# 03: compile-time error + Expect.throws(() => 1.e+2, // /// 05: ok + (e) => e is NoSuchMethodError); // /// 05: continued + 1d; // /// 06: compile-time error + 1D; // /// 07: compile-time error + Expect.throws(() => 1.d+2, // /// 08: ok + (e) => e is NoSuchMethodError); // /// 08: continued + Expect.throws(() => 1.D+2, // /// 09: ok + (e) => e is NoSuchMethodError); // /// 09: continued + 1.1d; // /// 10: compile-time error + 1.1D; // /// 11: compile-time error + 1e; // /// 02: compile-time error + 1x; // /// 03: compile-time error } diff --git a/tests/language_strong/optional_named_parameters_test.dart b/tests/language_strong/optional_named_parameters_test.dart index 002b5391f5c..94e56426cd4 100644 --- a/tests/language_strong/optional_named_parameters_test.dart +++ b/tests/language_strong/optional_named_parameters_test.dart @@ -64,28 +64,28 @@ class OptionalNamedParametersTest { Expect.equals(10, np.f22(10)); Expect.equals(20, F10()); Expect.equals(20, np.f21()); - Expect.equals(20, F10(20)); // //# 01: runtime error - Expect.equals(20, np.f21(20)); // //# 02: runtime error + Expect.equals(20, F10(20)); // /// 01: runtime error + Expect.equals(20, np.f21(20)); // /// 02: runtime error Expect.equals(20, F10(b:20)); Expect.equals(20, np.f21(b:20)); Expect.equals(1020, F21(10)); Expect.equals(1020, np.f32(10)); - Expect.equals(1025, F21(10, 25)); // //# 03: runtime error - Expect.equals(1025, np.f32(10, 25)); // //# 04: runtime error + Expect.equals(1025, F21(10, 25)); // /// 03: runtime error + Expect.equals(1025, np.f32(10, 25)); // /// 04: runtime error Expect.equals(1025, F21(10, b:25)); Expect.equals(1025, np.f32(10, b:25)); Expect.equals(102030, F31(10)); Expect.equals(102030, np.f42(10)); - Expect.equals(102530, F31(10, 25)); // //# 05: runtime error - Expect.equals(102530, np.f42(10, 25)); // //# 06: runtime error + Expect.equals(102530, F31(10, 25)); // /// 05: runtime error + Expect.equals(102530, np.f42(10, 25)); // /// 06: runtime error Expect.equals(102530, F31(10, b:25)); Expect.equals(102530, np.f42(10, b:25)); Expect.equals(102035, F31(10, c:35)); Expect.equals(102035, np.f42(10, c:35)); Expect.equals(102535, F31(10, b:25, c:35)); Expect.equals(102535, np.f42(10, b:25, c:35)); - Expect.equals(102535, F31(10, 25, c:35)); // //# 07: runtime error - Expect.equals(102535, np.f42(10, 25, c:35)); // //# 08: runtime error + Expect.equals(102535, F31(10, 25, c:35)); // /// 07: runtime error + Expect.equals(102535, np.f42(10, 25, c:35)); // /// 08: runtime error Expect.equals(102535, F31(10, c:35, b:25)); Expect.equals(102535, np.f42(10, c:35, b:25)); Expect.equals(10200040, F41(10)); @@ -93,7 +93,7 @@ class OptionalNamedParametersTest { Expect.equals(10203540, F41(10, c:35)); Expect.equals(10203540, np.f52(10, c:35)); Expect.equals(10250045, F41(10, d:45, b:25)); - Expect.equals(10250045, F41(10, 25, d:45)); // //# 09: runtime error + Expect.equals(10250045, F41(10, 25, d:45)); // /// 09: runtime error Expect.equals(10250045, np.f52(10, d:45, b:25)); Expect.equals(10253545, F41(10, d:45, c:35, b:25)); Expect.equals(10253545, np.f52(10, d:45, c:35, b:25)); diff --git a/tests/language_strong/override_field_test.dart b/tests/language_strong/override_field_test.dart index 9e7676113a5..1fa79683f61 100644 --- a/tests/language_strong/override_field_test.dart +++ b/tests/language_strong/override_field_test.dart @@ -9,9 +9,9 @@ class A { } class B extends A { - static int instanceFieldInA; // //# 01: compile-time error - int staticFieldInA; // //# 02: static type warning - static int staticFieldInA; // //# 03: static type warning + static int instanceFieldInA; // /// 01: compile-time error + int staticFieldInA; // /// 02: static type warning + static int staticFieldInA; // /// 03: static type warning } main() { diff --git a/tests/language_strong/override_inheritance_abstract_test.dart b/tests/language_strong/override_inheritance_abstract_test.dart index 0b40b88dc4c..32fb7d13f64 100644 --- a/tests/language_strong/override_inheritance_abstract_test.dart +++ b/tests/language_strong/override_inheritance_abstract_test.dart @@ -3,62 +3,62 @@ // BSD-style license that can be found in the LICENSE file. abstract class A { - method1(); //# 01: ok - method5(); //# 05: ok - method6(); //# 06: ok - method7(); //# 07: static type warning - get getter8; //# 08: static type warning - set setter9(_); //# 09: static type warning - method10(); //# 10: static type warning - get getter11; //# 11: static type warning - set setter12(_); //# 12: static type warning - get field13; //# 13: static type warning - set field14(_); //# 14: static type warning - method18() {} //# 18: ok - method27() {} //# 27: ok + method1(); /// 01: ok + method5(); /// 05: ok + method6(); /// 06: ok + method7(); /// 07: static type warning + get getter8; /// 08: static type warning + set setter9(_); /// 09: static type warning + method10(); /// 10: static type warning + get getter11; /// 11: static type warning + set setter12(_); /// 12: static type warning + get field13; /// 13: static type warning + set field14(_); /// 14: static type warning + method18() {} /// 18: ok + method27() {} /// 27: ok } abstract class I { - method10() {} //# 10: continued - get getter11 => 0; //# 11: continued - set setter12(_) {} //# 12: continued - var field13; //# 13: continued - var field14; //# 14: continued - method15() {} //# 15: ok - method16() {} //# 16: ok - method17() {} //# 17: static type warning - method18() {} //# 18: continued - var member19; //# 19: static type warning - var member20; //# 20: static type warning - var member21; //# 21: static type warning - get member22 => 0; //# 22: static type warning - set member23(_) {} //# 23: static type warning - var member24; //# 24: static type warning - var field25; //# 25: static type warning - var member26; //# 26: static type warning + method10() {} /// 10: continued + get getter11 => 0; /// 11: continued + set setter12(_) {} /// 12: continued + var field13; /// 13: continued + var field14; /// 14: continued + method15() {} /// 15: ok + method16() {} /// 16: ok + method17() {} /// 17: static type warning + method18() {} /// 18: continued + var member19; /// 19: static type warning + var member20; /// 20: static type warning + var member21; /// 21: static type warning + get member22 => 0; /// 22: static type warning + set member23(_) {} /// 23: static type warning + var member24; /// 24: static type warning + var field25; /// 25: static type warning + var member26; /// 26: static type warning } abstract class J { - get member20 => null; //# 20: continued - set member20(_) {} //# 20: continued - var member21; //# 21: continued + get member20 => null; /// 20: continued + set member20(_) {} /// 20: continued + var member21; /// 21: continued } class Class extends A implements I, J { - method1() {} //# 01: continued - method2(); //# 02: static type warning - get getter3; //# 03: static type warning - set setter4(_); //# 04: static type warning - method5() {} //# 05: continued - method6([a]) {} //# 06: continued - set field13(_) {} //# 13: continued - get field14 => 0; //# 14: continued - method15() {} //# 15: continued - method16([a]) {} //# 16: continued - get member24 => 0; //# 24: continued - final field25 = 0; //# 25: continued - set member26(_) {} //# 26: continued - method27(); //# 27: continued + method1() {} /// 01: continued + method2(); /// 02: static type warning + get getter3; /// 03: static type warning + set setter4(_); /// 04: static type warning + method5() {} /// 05: continued + method6([a]) {} /// 06: continued + set field13(_) {} /// 13: continued + get field14 => 0; /// 14: continued + method15() {} /// 15: continued + method16([a]) {} /// 16: continued + get member24 => 0; /// 24: continued + final field25 = 0; /// 25: continued + set member26(_) {} /// 26: continued + method27(); /// 27: continued } main() { diff --git a/tests/language_strong/override_inheritance_field_test.dart b/tests/language_strong/override_inheritance_field_test.dart index f46cf020d2a..dbb17fa8ec0 100644 --- a/tests/language_strong/override_inheritance_field_test.dart +++ b/tests/language_strong/override_inheritance_field_test.dart @@ -5,119 +5,119 @@ import "package:meta/meta.dart" show virtual; class A { - get getter1 => null; //# 01: ok - num get getter2 => null; //# 02: ok - num get getter3 => null; //# 03: ok - int get getter4 => null; //# 04: ok - int get getter5 => null; //# 05: static type warning - int get getter6 => null; //# 06: ok - int get getter7 => null; //# 07: static type warning - int get getter8 => null; //# 08: static type warning + get getter1 => null; /// 01: ok + num get getter2 => null; /// 02: ok + num get getter3 => null; /// 03: ok + int get getter4 => null; /// 04: ok + int get getter5 => null; /// 05: static type warning + int get getter6 => null; /// 06: ok + int get getter7 => null; /// 07: static type warning + int get getter8 => null; /// 08: static type warning - set setter1(_) => null; //# 21: ok - void set setter2(_) {} //# 22: ok - set setter3(_) => null; //# 23: ok - set setter4(_) => null; //# 24: ok - set setter5(num _) => null; //# 25: ok - set setter6(num _) => null; //# 26: ok - set setter7(int _) => null; //# 27: ok - set setter8(int _) => null; //# 28: static type warning - set setter9(int _) => null; //# 29: ok - set setter10(int _) => null; //# 30: static type warning - set setter11(int _) => null; //# 31: static type warning + set setter1(_) => null; /// 21: ok + void set setter2(_) {} /// 22: ok + set setter3(_) => null; /// 23: ok + set setter4(_) => null; /// 24: ok + set setter5(num _) => null; /// 25: ok + set setter6(num _) => null; /// 26: ok + set setter7(int _) => null; /// 27: ok + set setter8(int _) => null; /// 28: static type warning + set setter9(int _) => null; /// 29: ok + set setter10(int _) => null; /// 30: static type warning + set setter11(int _) => null; /// 31: static type warning - @virtual int field1; //# 41: ok - num field2; //# 42: ok - int field3; //# 43: ok - int field4; //# 44: static type warning - int field5; //# 45: ok - @virtual num field6; //# 46: ok - num field7; //# 47: static type warning - num get field8 => null; //# 48: static type warning - num field9; //# 49: ok - num field10; //# 50: ok - set field11(int _) {} //# 51: ok - void set field12(int _) {} //# 52: ok - num field13; //# 53: static type warning - set field14(num _) {} //# 54: static type warning + @virtual int field1; /// 41: ok + num field2; /// 42: ok + int field3; /// 43: ok + int field4; /// 44: static type warning + int field5; /// 45: ok + @virtual num field6; /// 46: ok + num field7; /// 47: static type warning + num get field8 => null; /// 48: static type warning + num field9; /// 49: ok + num field10; /// 50: ok + set field11(int _) {} /// 51: ok + void set field12(int _) {} /// 52: ok + num field13; /// 53: static type warning + set field14(num _) {} /// 54: static type warning } class B extends A { - num get getter6 => null; //# 06: continued - set setter9(num _) => null; //# 29: continued - num field5; //# 45: continued + num get getter6 => null; /// 06: continued + set setter9(num _) => null; /// 29: continued + num field5; /// 45: continued } abstract class I { - num get getter7 => null; //# 07: continued - String get getter8 => null; //# 08: continued - int get getter9 => null; //# 09: static type warning - int get getter10 => null; //# 10: static type warning - int get getter11 => null; //# 11: static type warning - set setter10(num _) => null; //# 30: continued - set setter11(String _) => null; //# 31: continued - set setter12(int _) => null; //# 32: static type warning - set setter13(int _) => null; //# 33: static type warning - set setter13(num _) => null; //# 33a: static type warning - set setter14(int _) => null; //# 34: static type warning + num get getter7 => null; /// 07: continued + String get getter8 => null; /// 08: continued + int get getter9 => null; /// 09: static type warning + int get getter10 => null; /// 10: static type warning + int get getter11 => null; /// 11: static type warning + set setter10(num _) => null; /// 30: continued + set setter11(String _) => null; /// 31: continued + set setter12(int _) => null; /// 32: static type warning + set setter13(int _) => null; /// 33: static type warning + set setter13(num _) => null; /// 33a: static type warning + set setter14(int _) => null; /// 34: static type warning } abstract class J { - String get getter9 => null; //# 09: continued - num get getter10 => null; //# 10: continued - num get getter11 => null; //# 11: continued - set setter12(String _) => null; //# 32: continued - set setter13(num _) => null; //# 33: continued - set setter13(int _) => null; //# 33a: continued - set setter14(num _) => null; //# 34: continued + String get getter9 => null; /// 09: continued + num get getter10 => null; /// 10: continued + num get getter11 => null; /// 11: continued + set setter12(String _) => null; /// 32: continued + set setter13(num _) => null; /// 33: continued + set setter13(int _) => null; /// 33a: continued + set setter14(num _) => null; /// 34: continued } abstract class Class extends B implements I, J { - get getter1 => null; //# 01: continued - num get getter2 => null; //# 02: continued - int get getter3 => null; //# 03: continued - num get getter4 => null; //# 04: continued - double get getter5 => null; //# 05: continued - double get getter6 => null; //# 06: continued - double get getter7 => null; //# 07: continued - double get getter8 => null; //# 08: continued - double get getter9 => null; //# 09: continued + get getter1 => null; /// 01: continued + num get getter2 => null; /// 02: continued + int get getter3 => null; /// 03: continued + num get getter4 => null; /// 04: continued + double get getter5 => null; /// 05: continued + double get getter6 => null; /// 06: continued + double get getter7 => null; /// 07: continued + double get getter8 => null; /// 08: continued + double get getter9 => null; /// 09: continued - set setter1(_) => null; //# 21: continued - set setter2(_) => null; //# 22: continued - void set setter3(_) {} //# 23: continued - void set setter4(_) {} //# 24: continued - set setter5(num _) => null; //# 25: continued - set setter6(int _) => null; //# 26: continued - set setter7(num _) => null; //# 27: continued - set setter8(double _) => null; //# 28: continued - set setter9(double _) => null; //# 29: continued - set setter10(double _) => null; //# 30: continued - set setter11(double _) => null; //# 31: continued - set setter12(double _) => null; //# 32: continued + set setter1(_) => null; /// 21: continued + set setter2(_) => null; /// 22: continued + void set setter3(_) {} /// 23: continued + void set setter4(_) {} /// 24: continued + set setter5(num _) => null; /// 25: continued + set setter6(int _) => null; /// 26: continued + set setter7(num _) => null; /// 27: continued + set setter8(double _) => null; /// 28: continued + set setter9(double _) => null; /// 29: continued + set setter10(double _) => null; /// 30: continued + set setter11(double _) => null; /// 31: continued + set setter12(double _) => null; /// 32: continued - int field1; //# 41: continued - int field2; //# 42: continued - num field3; //# 43: continued - double field4; //# 44: continued - double field5; //# 45: continued - int get field6 => null; //# 46: continued - String get field7 => null; //# 47: continued - String field8; //# 48: continued - set field9(int _) {} //# 49: continued - void set field10(int _) {} //# 50: continued - num field11; //# 51: continued - num field12; //# 52: continued - set field13(String _) {} //# 53: continued - String field14; //# 54: continued + int field1; /// 41: continued + int field2; /// 42: continued + num field3; /// 43: continued + double field4; /// 44: continued + double field5; /// 45: continued + int get field6 => null; /// 46: continued + String get field7 => null; /// 47: continued + String field8; /// 48: continued + set field9(int _) {} /// 49: continued + void set field10(int _) {} /// 50: continued + num field11; /// 51: continued + num field12; /// 52: continued + set field13(String _) {} /// 53: continued + String field14; /// 54: continued } class SubClass extends Class { - double get getter10 => null; //# 10: continued - String get getter11 => null; //# 11: continued - set setter13(double _) => null; //# 33: continued - set setter13(double _) => null; //# 33a: continued - set setter14(String _) => null; //# 34: continued + double get getter10 => null; /// 10: continued + String get getter11 => null; /// 11: continued + set setter13(double _) => null; /// 33: continued + set setter13(double _) => null; /// 33a: continued + set setter14(String _) => null; /// 34: continued } main() { diff --git a/tests/language_strong/override_inheritance_generic_test.dart b/tests/language_strong/override_inheritance_generic_test.dart index 2e00ceefb8f..bf6ae37ad5f 100644 --- a/tests/language_strong/override_inheritance_generic_test.dart +++ b/tests/language_strong/override_inheritance_generic_test.dart @@ -3,68 +3,68 @@ // BSD-style license that can be found in the LICENSE file. class A { - method1(T t) => null; //# 01: ok - method2(T t) => null; //# 02: ok - method4(T t) => null; //# 04: static type warning - method5(T t) => null; //# 05: ok - method7(T t) => null; //# 07: static type warning + method1(T t) => null; /// 01: ok + method2(T t) => null; /// 02: ok + method4(T t) => null; /// 04: static type warning + method5(T t) => null; /// 05: ok + method7(T t) => null; /// 07: static type warning } class B extends A - //# 01: continued - //# 02: continued - //# 04: continued - //# 05: continued + /// 01: continued + /// 02: continued + /// 04: continued + /// 05: continued { - method1(S s) => null; //# 01: continued - method2(int i) => null; //# 02: continued - method3(S s) => null; //# 03: ok - method4(int i) => null; //# 04: continued - method6(S s) => null; //# 06: static type warning + method1(S s) => null; /// 01: continued + method2(int i) => null; /// 02: continued + method3(S s) => null; /// 03: ok + method4(int i) => null; /// 04: continued + method6(S s) => null; /// 06: static type warning } abstract class I { - method3(U u) => null; //# 03: continued - method6(U u) => null; //# 06: continued - method7(U u) => null; //# 07: continued - method8(U u) => null; //# 08: static type warning - method9(U u) => null; //# 09: static type warning - method10(U u) => null; //# 10: static type warning + method3(U u) => null; /// 03: continued + method6(U u) => null; /// 06: continued + method7(U u) => null; /// 07: continued + method8(U u) => null; /// 08: static type warning + method9(U u) => null; /// 09: static type warning + method10(U u) => null; /// 10: static type warning } abstract class J { - method8(V v) => null; //# 08: continued - method9(V v) => null; //# 09: continued - method10(V v) => null; //# 10: continued + method8(V v) => null; /// 08: continued + method9(V v) => null; /// 09: continued + method10(V v) => null; /// 10: continued } abstract class Class extends B - //# 03: continued - //# 05: continued - //# 06: continued - //# 07: continued + /// 03: continued + /// 05: continued + /// 06: continued + /// 07: continued implements I - //# 03: continued - //# 06: continued - //# 07: continued - //# 08: continued - //# 09: continued - //# 10: continued + /// 03: continued + /// 06: continued + /// 07: continued + /// 08: continued + /// 09: continued + /// 10: continued , J - //# 08: continued - //# 09: continued - //# 10: continued + /// 08: continued + /// 09: continued + /// 10: continued { - method3(num i) => null; //# 03: continued - method5(W w) => null; //# 05: continued - method6(int i) => null; //# 06: continued - method7(double d) => null; //# 07: continued - method8(double d) => null; //# 08: continued + method3(num i) => null; /// 03: continued + method5(W w) => null; /// 05: continued + method6(int i) => null; /// 06: continued + method7(double d) => null; /// 07: continued + method8(double d) => null; /// 08: continued } class SubClass extends Class { - method9(double d) => null; //# 09: continued - method10(String s) => null; //# 10: continued + method9(double d) => null; /// 09: continued + method10(String s) => null; /// 10: continued } main() { diff --git a/tests/language_strong/override_inheritance_method_test.dart b/tests/language_strong/override_inheritance_method_test.dart index 990b09a6c64..ea699b53703 100644 --- a/tests/language_strong/override_inheritance_method_test.dart +++ b/tests/language_strong/override_inheritance_method_test.dart @@ -5,94 +5,94 @@ // Test static warnings for method overrides. class A { - method1() => null; //# 01: ok - method2(a) => null; //# 02: ok - method3(a, b, c, d) => null; //# 03: ok - method4() => null; //# 04: static type warning - method6(a, b, c) => null; //# 06: static type warning - method7([a]) => null; //# 07: ok - method8([a, b]) => null; //# 08: ok - method9([a, b, c]) => null; //# 09: ok - method10([a]) => null; //# 10: ok - method11(a) => null; //# 11: static type warning - method12(a, [b]) => null; //# 12: static type warning - method13(a, [b]) => null; //# 13: static type warning - method14(a, b, [c, d, e]) => null; //# 14: static type warning - method15({a}) => null; //# 15: ok - method16({a, b}) => null; //# 16: ok - method17({a, b, c}) => null; //# 17: ok - method18(d, {a, b, c}) => null; //# 18: ok - method19({a}) => null; //# 19: static type warning - method20({a, b}) => null; //# 20: static type warning - method21({a, b, c, d}) => null; //# 21: static type warning + method1() => null; /// 01: ok + method2(a) => null; /// 02: ok + method3(a, b, c, d) => null; /// 03: ok + method4() => null; /// 04: static type warning + method6(a, b, c) => null; /// 06: static type warning + method7([a]) => null; /// 07: ok + method8([a, b]) => null; /// 08: ok + method9([a, b, c]) => null; /// 09: ok + method10([a]) => null; /// 10: ok + method11(a) => null; /// 11: static type warning + method12(a, [b]) => null; /// 12: static type warning + method13(a, [b]) => null; /// 13: static type warning + method14(a, b, [c, d, e]) => null; /// 14: static type warning + method15({a}) => null; /// 15: ok + method16({a, b}) => null; /// 16: ok + method17({a, b, c}) => null; /// 17: ok + method18(d, {a, b, c}) => null; /// 18: ok + method19({a}) => null; /// 19: static type warning + method20({a, b}) => null; /// 20: static type warning + method21({a, b, c, d}) => null; /// 21: static type warning - method22(int a) => null; //# 22: ok - method23(int a) => null; //# 23: ok - void method24() {} //# 24: ok - method25() => null; //# 25: ok - void method26() {} //# 26: ok - int method27() => null; //# 27: static type warning - method28(int a) => null; //# 28: ok - method29(int a) => null; //# 29: ok - method30(int a) => null; //# 30: static type warning + method22(int a) => null; /// 22: ok + method23(int a) => null; /// 23: ok + void method24() {} /// 24: ok + method25() => null; /// 25: ok + void method26() {} /// 26: ok + int method27() => null; /// 27: static type warning + method28(int a) => null; /// 28: ok + method29(int a) => null; /// 29: ok + method30(int a) => null; /// 30: static type warning } class B extends A { - method28(num a) => null; //# 28: continued - method29(a) => null; //# 29: continued + method28(num a) => null; /// 28: continued + method29(a) => null; /// 29: continued } abstract class I { - method5() => null; //# 05: static type warning - method31(int a) => null; //# 31: static type warning - method32(int a) => null; //# 32: static type warning - method33(num a) => null; //# 33: static type warning + method5() => null; /// 05: static type warning + method31(int a) => null; /// 31: static type warning + method32(int a) => null; /// 32: static type warning + method33(num a) => null; /// 33: static type warning } abstract class J { - method31(num a) => null; //# 31: continued - method32(double a) => null; //# 32: continued - method33(int a) => null; //# 33: continued + method31(num a) => null; /// 31: continued + method32(double a) => null; /// 32: continued + method33(int a) => null; /// 33: continued } class Class extends B implements I, J { - method1() => null; //# 01: continued - method2(b) => null; //# 02: continued - method3(b, a, d, c) => null; //# 03: continued - method4(a) => null; //# 04: continued - method5(a) => null; //# 05: continued - method6(a, b, c, d) => null; //# 06: continued - method7([a]) => null; //# 07: continued - method8([b, a]) => null; //# 08: continued - method9([b, d, a, c]) => null; //# 09: continued - method10([a]) => null; //# 10: continued - method11() => null; //# 11: continued - method12(a) => null; //# 12: continued - method13([a]) => null; //# 13: continued - method14([a, b, c, d]) => null; //# 14: continued - method15({a}) => null; //# 15: continued - method16({b, a}) => null; //# 16: continued - method17({b, c, a, d}) => null; //# 17: continued - method18(e, {b, c, a, d}) => null; //# 18: continued - method19() => null; //# 19: continued - method20({b}) => null; //# 20: continued - method21({a, e, d, c}) => null; //# 21: continued + method1() => null; /// 01: continued + method2(b) => null; /// 02: continued + method3(b, a, d, c) => null; /// 03: continued + method4(a) => null; /// 04: continued + method5(a) => null; /// 05: continued + method6(a, b, c, d) => null; /// 06: continued + method7([a]) => null; /// 07: continued + method8([b, a]) => null; /// 08: continued + method9([b, d, a, c]) => null; /// 09: continued + method10([a]) => null; /// 10: continued + method11() => null; /// 11: continued + method12(a) => null; /// 12: continued + method13([a]) => null; /// 13: continued + method14([a, b, c, d]) => null; /// 14: continued + method15({a}) => null; /// 15: continued + method16({b, a}) => null; /// 16: continued + method17({b, c, a, d}) => null; /// 17: continued + method18(e, {b, c, a, d}) => null; /// 18: continued + method19() => null; /// 19: continued + method20({b}) => null; /// 20: continued + method21({a, e, d, c}) => null; /// 21: continued - method22(int a) => null; //# 22: continued - method23(num a) => null; //# 23: continued - method24() => null; //# 24: continued - void method25() {} //# 25: continued - int method26() => null; //# 26: continued - void method27() {} //# 27: continued - method28(double a) => null; //# 28: continued - method29(String a) => null; //# 29: continued - method30(String a) => null; //# 30: continued + method22(int a) => null; /// 22: continued + method23(num a) => null; /// 23: continued + method24() => null; /// 24: continued + void method25() {} /// 25: continued + int method26() => null; /// 26: continued + void method27() {} /// 27: continued + method28(double a) => null; /// 28: continued + method29(String a) => null; /// 29: continued + method30(String a) => null; /// 30: continued } class SubClass extends Class { - method31(double a) => null; //# 31: continued - method32(String a) => null; //# 32: continued - method33(double a) => null; //# 33: continued + method31(double a) => null; /// 31: continued + method32(String a) => null; /// 32: continued + method33(double a) => null; /// 33: continued } main() { diff --git a/tests/language_strong/override_inheritance_mixed_test.dart b/tests/language_strong/override_inheritance_mixed_test.dart index 9a43d159e25..199b466d7c9 100644 --- a/tests/language_strong/override_inheritance_mixed_test.dart +++ b/tests/language_strong/override_inheritance_mixed_test.dart @@ -3,39 +3,39 @@ // BSD-style license that can be found in the LICENSE file. class A { - var member1; //# 01: compile-time error - member2() {} //# 02: compile-time error - get member3 => null; //# 03: compile-time error - member4() {} //# 04: compile-time error + var member1; /// 01: compile-time error + member2() {} /// 02: compile-time error + get member3 => null; /// 03: compile-time error + member4() {} /// 04: compile-time error } abstract class I { - var member5; //# 05: ok - var member6; //# 06: static type warning - get member7; //# 07: static type warning - get member8; //# 08: static type warning - get member9; //# 09: static type warning + var member5; /// 05: ok + var member6; /// 06: static type warning + get member7; /// 07: static type warning + get member8; /// 08: static type warning + get member9; /// 09: static type warning } abstract class J { - get member5; //# 05: continued - member6() {} //# 06: continued - member7() {} //# 07: continued - member8() {} //# 08: continued - member9() {} //# 09: continued + get member5; /// 05: continued + member6() {} /// 06: continued + member7() {} /// 07: continued + member8() {} /// 08: continued + member9() {} /// 09: continued } abstract class B extends A implements I, J { } class Class extends B { - member1() {} //# 01: continued - var member2; //# 02: continued - member3() {} //# 03: continued - get member4 => null; //# 04: continued - var member5; //# 05: continued - member8() {} //# 08: continued - get member9 => null; //# 09: continued + member1() {} /// 01: continued + var member2; /// 02: continued + member3() {} /// 03: continued + get member4 => null; /// 04: continued + var member5; /// 05: continued + member8() {} /// 08: continued + get member9 => null; /// 09: continued } main() { diff --git a/tests/language_strong/override_inheritance_no_such_method_test.dart b/tests/language_strong/override_inheritance_no_such_method_test.dart index efb061da382..45be62eb3f3 100644 --- a/tests/language_strong/override_inheritance_no_such_method_test.dart +++ b/tests/language_strong/override_inheritance_no_such_method_test.dart @@ -6,45 +6,45 @@ // concrete classes. abstract class A { - method6(); //# 06: static type warning - method7(); //# 07: static type warning - method8(); //# 08: ok + method6(); /// 06: static type warning + method7(); /// 07: static type warning + method8(); /// 08: ok } abstract class I { - method9(); //# 09: static type warning - method10(); //# 10: static type warning - method11(); //# 11: ok + method9(); /// 09: static type warning + method10(); /// 10: static type warning + method11(); /// 11: ok } -@proxy //# 02: static type warning -@proxy //# 07: continued -@proxy //# 10: continued +@proxy /// 02: static type warning +@proxy /// 07: continued +@proxy /// 10: continued class Class1 extends A implements I { - method1(); //# 01: static type warning + method1(); /// 01: static type warning - method2(); //# 02: continued + method2(); /// 02: continued - noSuchMethod(_) => null; //# 03: ok - method3(); //# 03: continued + noSuchMethod(_) => null; /// 03: ok + method3(); /// 03: continued - noSuchMethod(_, [__]) => null; //# 04: ok - method4(); //# 04: continued + noSuchMethod(_, [__]) => null; /// 04: ok + method4(); /// 04: continued - noSuchMethod(_); //# 05: ok - method5(); //# 05: continued + noSuchMethod(_); /// 05: ok + method5(); /// 05: continued - noSuchMethod(_) => null; //# 08: continued + noSuchMethod(_) => null; /// 08: continued - noSuchMethod(_) => null; //# 11: continued + noSuchMethod(_) => null; /// 11: continued } -@proxy //# 12: static type warning +@proxy /// 12: static type warning class B { - method12(); //# 12: continued + method12(); /// 12: continued - noSuchMethod(_) => null; //# 13: static type warning - method13(); //# 13: continued + noSuchMethod(_) => null; /// 13: static type warning + method13(); /// 13: continued } class Class2 extends B { diff --git a/tests/language_strong/override_method_with_field_test.dart b/tests/language_strong/override_method_with_field_test.dart index 0a79bde1386..777fe921e24 100644 --- a/tests/language_strong/override_method_with_field_test.dart +++ b/tests/language_strong/override_method_with_field_test.dart @@ -15,7 +15,7 @@ class Super { class Sub extends Super { Sub() : super(); - var instanceMethod = 87; // //# 01: compile-time error + var instanceMethod = 87; // /// 01: compile-time error superInstanceMethod() => super.instanceMethod(); } @@ -26,6 +26,6 @@ main() { Sub sub = s; print(s.instanceMethod); Expect.equals(42, s.superInstanceMethod()); - Expect.equals(42, sup.superInstanceMethod()); //# 02: static type warning + Expect.equals(42, sup.superInstanceMethod()); /// 02: static type warning Expect.equals(42, sub.superInstanceMethod()); } diff --git a/tests/language_strong/parameter_default_test.dart b/tests/language_strong/parameter_default_test.dart index 6a00febd817..9f279bbc55e 100644 --- a/tests/language_strong/parameter_default_test.dart +++ b/tests/language_strong/parameter_default_test.dart @@ -4,25 +4,25 @@ class C { foo(a - : 1 // //# 01: compile-time error - = 1 // //# 02: compile-time error + : 1 // /// 01: compile-time error + = 1 // /// 02: compile-time error ) { print(a); } static bar(a - : 1 // //# 03: compile-time error - = 1 // //# 04: compile-time error + : 1 // /// 03: compile-time error + = 1 // /// 04: compile-time error ) { print(a); } } baz(a - : 1 // //# 05: compile-time error - = 1 // //# 06: compile-time error + : 1 // /// 05: compile-time error + = 1 // /// 06: compile-time error ) { print(a); } main() { foo(a - : 1 // //# 07: compile-time error - = 1 // //# 08: compile-time error + : 1 // /// 07: compile-time error + = 1 // /// 08: compile-time error ) { print(a); } foo(1); diff --git a/tests/language_strong/parameter_metadata_test.dart b/tests/language_strong/parameter_metadata_test.dart index 8017e632410..65aed8c1cbc 100644 --- a/tests/language_strong/parameter_metadata_test.dart +++ b/tests/language_strong/parameter_metadata_test.dart @@ -5,13 +5,13 @@ // Test that metadata annotations can be handled on nested parameters. test( - @deprecated // //# 01: ok + @deprecated // /// 01: ok f( - @deprecated // //# 02: ok + @deprecated // /// 02: ok a, - @deprecated // //# 03: ok + @deprecated // /// 03: ok g( - @deprecated //# 04: ok + @deprecated /// 04: ok b))) {} main() { diff --git a/tests/language_strong/positional_parameters_type_test.dart b/tests/language_strong/positional_parameters_type_test.dart index e80996fa0d3..1db52858896 100644 --- a/tests/language_strong/positional_parameters_type_test.dart +++ b/tests/language_strong/positional_parameters_type_test.dart @@ -18,6 +18,6 @@ main() { anyFunction = funNumOptBoolX; acceptFunNumOptBool(funNumOptBool); acceptFunNumOptBool(funNumOptBoolX); - acceptFunNumOptBool(funNum); // //# 01: runtime error - acceptFunNumOptBool(funNumBool); // //# 02: static type warning, runtime error + acceptFunNumOptBool(funNum); // /// 01: runtime error + acceptFunNumOptBool(funNumBool); // /// 02: static type warning, runtime error } diff --git a/tests/language_strong/prefix22_test.dart b/tests/language_strong/prefix22_test.dart index 22d9e64ec63..96c1d867e2a 100644 --- a/tests/language_strong/prefix22_test.dart +++ b/tests/language_strong/prefix22_test.dart @@ -9,7 +9,7 @@ library Prefix21NegativeTest.dart; import "library12.dart" as lib12; class myClass { - myClass(lib12.Library13 p) { // //# static type warning + myClass(lib12.Library13 p) { // /// static type warning } } diff --git a/tests/language_strong/prefix23_test.dart b/tests/language_strong/prefix23_test.dart index 72465f0cc3d..167ba594bc3 100644 --- a/tests/language_strong/prefix23_test.dart +++ b/tests/language_strong/prefix23_test.dart @@ -9,7 +9,7 @@ library Prefix23Test.dart; import "library12.dart" as lib12; class myClass { - lib12.Library13 fld; // //# static type warning + lib12.Library13 fld; // /// static type warning } main() { diff --git a/tests/language_strong/prefix_assignment_test.dart b/tests/language_strong/prefix_assignment_test.dart index 14e6f51a0f0..b473fc2014b 100644 --- a/tests/language_strong/prefix_assignment_test.dart +++ b/tests/language_strong/prefix_assignment_test.dart @@ -16,11 +16,11 @@ class Base { class Derived extends Base { void f() { - p = 1; //# 01: compile-time error + p = 1; /// 01: compile-time error } } main() { new Derived().f(); - p = 1; //# 02: compile-time error + p = 1; /// 02: compile-time error } diff --git a/tests/language_strong/prefix_identifier_reference_test.dart b/tests/language_strong/prefix_identifier_reference_test.dart index e59b6fea630..47b169e49c8 100644 --- a/tests/language_strong/prefix_identifier_reference_test.dart +++ b/tests/language_strong/prefix_identifier_reference_test.dart @@ -17,9 +17,9 @@ import "empty_library.dart" as p; void f(x) {} main() { - f(p); // //# 01: compile-time error - var x = p; // //# 02: compile-time error - var x = p[0]; //# 03: compile-time error - p[0] = null; // //# 04: compile-time error - p += 0; // //# 05: compile-time error + f(p); // /// 01: compile-time error + var x = p; // /// 02: compile-time error + var x = p[0]; /// 03: compile-time error + p[0] = null; // /// 04: compile-time error + p += 0; // /// 05: compile-time error } diff --git a/tests/language_strong/prefix_unqualified_invocation_test.dart b/tests/language_strong/prefix_unqualified_invocation_test.dart index d4a174c6d98..020ca3e5319 100644 --- a/tests/language_strong/prefix_unqualified_invocation_test.dart +++ b/tests/language_strong/prefix_unqualified_invocation_test.dart @@ -19,11 +19,11 @@ class Base { class Derived extends Base { void f() { - p(); //# 01: compile-time error + p(); /// 01: compile-time error } } main() { new Derived().f(); - p(); //# 02: compile-time error + p(); /// 02: compile-time error } diff --git a/tests/language_strong/private_access_test.dart b/tests/language_strong/private_access_test.dart index 984fdbac920..ff608671305 100644 --- a/tests/language_strong/private_access_test.dart +++ b/tests/language_strong/private_access_test.dart @@ -8,14 +8,14 @@ import 'private_access_lib.dart'; import 'private_access_lib.dart' as private; main() { - Expect.throws(() => _function(), // //# 01: static type warning - (e) => e is NoSuchMethodError); // //# 01: continued - Expect.throws(() => private._function(), // //# 02: static type warning - (e) => e is NoSuchMethodError); // //# 02: continued - Expect.throws(() => new _Class()); // //# 03: static type warning - Expect.throws(() => new private._Class()); // //# 04: static type warning - Expect.throws(() => new Class._constructor(), // //# 05: static type warning - (e) => e is NoSuchMethodError); // //# 05: continued - Expect.throws(() => new private.Class._constructor(), //# 06: static type warning - (e) => e is NoSuchMethodError); // //# 06: continued + Expect.throws(() => _function(), // /// 01: static type warning + (e) => e is NoSuchMethodError); // /// 01: continued + Expect.throws(() => private._function(), // /// 02: static type warning + (e) => e is NoSuchMethodError); // /// 02: continued + Expect.throws(() => new _Class()); // /// 03: static type warning + Expect.throws(() => new private._Class()); // /// 04: static type warning + Expect.throws(() => new Class._constructor(), // /// 05: static type warning + (e) => e is NoSuchMethodError); // /// 05: continued + Expect.throws(() => new private.Class._constructor(), /// 06: static type warning + (e) => e is NoSuchMethodError); // /// 06: continued } \ No newline at end of file diff --git a/tests/language_strong/proxy2_test.dart b/tests/language_strong/proxy2_test.dart index 4341c4d8844..485f26e8d62 100644 --- a/tests/language_strong/proxy2_test.dart +++ b/tests/language_strong/proxy2_test.dart @@ -19,9 +19,9 @@ class WrongProxy {} class PrefixProxy {} main() { - try { new WrongProxy().foo; } catch (e) {} // //# 01: static type warning - try { new WrongProxy().foo(); } catch (e) {} // //# 02: static type warning + try { new WrongProxy().foo; } catch (e) {} // /// 01: static type warning + try { new WrongProxy().foo(); } catch (e) {} // /// 02: static type warning - try { new PrefixProxy().foo; } catch (e) {} //# 03: ok - try { new PrefixProxy().foo(); } catch (e) {} //# 04: ok + try { new PrefixProxy().foo; } catch (e) {} /// 03: ok + try { new PrefixProxy().foo(); } catch (e) {} /// 04: ok } diff --git a/tests/language_strong/proxy3_test.dart b/tests/language_strong/proxy3_test.dart index 5c90fd0a6d1..9a538689dc5 100644 --- a/tests/language_strong/proxy3_test.dart +++ b/tests/language_strong/proxy3_test.dart @@ -16,9 +16,9 @@ class ValidProxy {} class InvalidProxy {} main() { - try { new InvalidProxy().foo; } catch (e) {} // //# 01: static type warning - try { new InvalidProxy().foo(); } catch (e) {} // //# 02: static type warning + try { new InvalidProxy().foo; } catch (e) {} // /// 01: static type warning + try { new InvalidProxy().foo(); } catch (e) {} // /// 02: static type warning - try { new ValidProxy().foo; } catch (e) {} //# 03: ok - try { new ValidProxy().foo(); } catch (e) {} //# 04: ok + try { new ValidProxy().foo; } catch (e) {} /// 03: ok + try { new ValidProxy().foo(); } catch (e) {} /// 04: ok } diff --git a/tests/language_strong/proxy_test.dart b/tests/language_strong/proxy_test.dart index 404e274a631..4d4c1c7f032 100644 --- a/tests/language_strong/proxy_test.dart +++ b/tests/language_strong/proxy_test.dart @@ -15,12 +15,12 @@ const alias = proxy; class AliasProxy {} main() { - try { new NonProxy().foo; } catch (e) {} //# 01: static type warning - try { new NonProxy().foo(); } catch (e) {} //# 02: static type warning + try { new NonProxy().foo; } catch (e) {} /// 01: static type warning + try { new NonProxy().foo(); } catch (e) {} /// 02: static type warning - try { new Proxy().foo; } catch (e) {} //# 03: ok - try { new Proxy().foo(); } catch (e) {} //# 04: ok + try { new Proxy().foo; } catch (e) {} /// 03: ok + try { new Proxy().foo(); } catch (e) {} /// 04: ok - try { new AliasProxy().foo; } catch (e) {} //# 05: ok - try { new AliasProxy().foo(); } catch (e) {} //# 06: ok + try { new AliasProxy().foo; } catch (e) {} /// 05: ok + try { new AliasProxy().foo(); } catch (e) {} /// 06: ok } \ No newline at end of file diff --git a/tests/language_strong/redirecting_factory_default_values_test.dart b/tests/language_strong/redirecting_factory_default_values_test.dart index b2fee51201d..152d2c73c50 100644 --- a/tests/language_strong/redirecting_factory_default_values_test.dart +++ b/tests/language_strong/redirecting_factory_default_values_test.dart @@ -9,8 +9,8 @@ import "package:expect/expect.dart"; class A { A(this.a, [this.b = 0]); factory A.f(a) = A; - factory A.g(a, [b = 0]) = A; // //# 01: compile-time error - factory A.h(a, {b: 0}) = A; // //# 02: compile-time error + factory A.g(a, [b = 0]) = A; // /// 01: compile-time error + factory A.h(a, {b: 0}) = A; // /// 02: compile-time error int a; int b; diff --git a/tests/language_strong/redirecting_factory_infinite_steps_test.dart b/tests/language_strong/redirecting_factory_infinite_steps_test.dart index cc22535d92c..e6550801e57 100644 --- a/tests/language_strong/redirecting_factory_infinite_steps_test.dart +++ b/tests/language_strong/redirecting_factory_infinite_steps_test.dart @@ -13,11 +13,11 @@ // indirectly via a sequence of redirections." class Foo extends Bar { - factory Foo() = Bar; //# 01: static type warning, dynamic type error + factory Foo() = Bar; /// 01: static type warning, dynamic type error } class Bar { - factory Bar() = Foo; //# 02: compile-time error + factory Bar() = Foo; /// 02: compile-time error } main() { diff --git a/tests/language_strong/redirecting_factory_malbounded_test.dart b/tests/language_strong/redirecting_factory_malbounded_test.dart index 90ca684f581..83da0674b6c 100644 --- a/tests/language_strong/redirecting_factory_malbounded_test.dart +++ b/tests/language_strong/redirecting_factory_malbounded_test.dart @@ -10,7 +10,7 @@ class Foo extends Bar { } class Bar { factory Bar() { return new Foo.create(); diff --git a/tests/language_strong/ref_before_declaration_test.dart b/tests/language_strong/ref_before_declaration_test.dart index 9a6c2b556cd..677f6bee2a5 100644 --- a/tests/language_strong/ref_before_declaration_test.dart +++ b/tests/language_strong/ref_before_declaration_test.dart @@ -18,7 +18,7 @@ class C { void test1() { use(f); // Refers to instance field f. - var f = 'A shut mouth gathers no foot.'; // //# 00: compile-time error + var f = 'A shut mouth gathers no foot.'; // /// 00: compile-time error } void test2() { @@ -26,7 +26,7 @@ class C { use(f); // Refers to instance field f. } - var f = 'When chemists die, they barium.'; // //# 01: compile-time error + var f = 'When chemists die, they barium.'; // /// 01: compile-time error if (true) { var f = 1; // ok, shadows outer f and instance field f. } @@ -37,19 +37,19 @@ class C { use(x); // Refers to top-level x. use(y); // Refers to top-level y. } - final x = "I have not yet begun to procrastinate."; // //# 02: compile-time error - const y = "Honk if you like peace and quiet!"; // //# 03: compile-time error + final x = "I have not yet begun to procrastinate."; // /// 02: compile-time error + const y = "Honk if you like peace and quiet!"; // /// 03: compile-time error } void test4() { void Q() { P(); // Refers to non-existing top-level function P } - void P() { // //# 06: compile-time error - Q(); // //# 06: continued - } // //# 06: continued + void P() { // /// 06: compile-time error + Q(); // /// 06: continued + } // /// 06: continued - Function f = () {x = f;}; // //# 07: compile-time error + Function f = () {x = f;}; // /// 07: compile-time error } test() { @@ -62,12 +62,12 @@ class C { void testTypeRef() { String s = 'Can vegetarians eat animal crackers?'; - var String = "I distinctly remember forgetting that."; // //# 04: compile-time error + var String = "I distinctly remember forgetting that."; // /// 04: compile-time error } void testLibPrefix() { var pie = math.PI; - final math = 0; // //# 05: compile-time error + final math = 0; // /// 05: compile-time error } diff --git a/tests/language_strong/regress_19413_test.dart b/tests/language_strong/regress_19413_test.dart index d166af17891..84ff0996053 100644 --- a/tests/language_strong/regress_19413_test.dart +++ b/tests/language_strong/regress_19413_test.dart @@ -8,5 +8,5 @@ import 'regress_19413_foo.dart' as foo; import 'regress_19413_bar.dart' as foo; main() { - foo.f(); //# 01: static type warning, runtime error + foo.f(); /// 01: static type warning, runtime error } \ No newline at end of file diff --git a/tests/language_strong/regress_20394_test.dart b/tests/language_strong/regress_20394_test.dart index 1cf77fafaac..4621ea1f930 100644 --- a/tests/language_strong/regress_20394_test.dart +++ b/tests/language_strong/regress_20394_test.dart @@ -3,7 +3,7 @@ import 'regress_20394_lib.dart'; class M {} class C extends Super with M { - C() : super._private(42); // //# 01: compile-time error + C() : super._private(42); // /// 01: compile-time error } main() { diff --git a/tests/language_strong/regress_21793_test.dart b/tests/language_strong/regress_21793_test.dart index 623f7f71ffc..2ca0c5fe42d 100644 --- a/tests/language_strong/regress_21793_test.dart +++ b/tests/language_strong/regress_21793_test.dart @@ -6,9 +6,9 @@ import 'package:expect/expect.dart'; -/* // //# 01: static type warning, runtime error +/* // /// 01: static type warning, runtime error class A { call(x) => x; } -*/ // //# 01: continued +*/ // /// 01: continued main() { print(new A()(499)); diff --git a/tests/language_strong/regress_21912_test.dart b/tests/language_strong/regress_21912_test.dart index 84817e3f436..8a7151bcf0c 100644 --- a/tests/language_strong/regress_21912_test.dart +++ b/tests/language_strong/regress_21912_test.dart @@ -16,7 +16,7 @@ void main() { Function2, Function2> t1; Function2 t2; Function2, Function2> left; - left = t1; //# 01: static type warning - left = t2; //# 02: static type warning + left = t1; /// 01: static type warning + left = t2; /// 02: static type warning } } diff --git a/tests/language_strong/regress_22936_test.dart b/tests/language_strong/regress_22936_test.dart index 3b3ac4c899f..1239947a3ca 100644 --- a/tests/language_strong/regress_22936_test.dart +++ b/tests/language_strong/regress_22936_test.dart @@ -16,7 +16,7 @@ foo() { main() { final x = null; try { - x = // //# 01: static type warning + x = // /// 01: static type warning foo(); } on NoSuchMethodError { } diff --git a/tests/language_strong/regress_22976_test.dart b/tests/language_strong/regress_22976_test.dart index d2081cd149e..67d69570b3f 100644 --- a/tests/language_strong/regress_22976_test.dart +++ b/tests/language_strong/regress_22976_test.dart @@ -9,6 +9,6 @@ class B implements A {} class C implements B, A {} main() { - A a0 = new C(); //# 01: ok - A a1 = new C(); //# 02: ok + A a0 = new C(); /// 01: ok + A a1 = new C(); /// 02: ok } diff --git a/tests/language_strong/regress_23038_test.dart b/tests/language_strong/regress_23038_test.dart index 8c5b9c2f72b..643ca7853d1 100644 --- a/tests/language_strong/regress_23038_test.dart +++ b/tests/language_strong/regress_23038_test.dart @@ -4,9 +4,9 @@ class C { const - factory //# 01: compile-time error + factory /// 01: compile-time error C() - = C> //# 01: continued + = C> /// 01: continued ; } diff --git a/tests/language_strong/regress_23051_test.dart b/tests/language_strong/regress_23051_test.dart index bacc0d48c24..41fa9671e38 100644 --- a/tests/language_strong/regress_23051_test.dart +++ b/tests/language_strong/regress_23051_test.dart @@ -5,11 +5,11 @@ // Regression test for issue 23051. main() { - new A(); // //# 01: compile-time error + new A(); // /// 01: compile-time error } -class A { // //# 01: continued - // Note the trailing ' in the next line. //# 01: continued - get foo => bar();' // //# 01: continued +class A { // /// 01: continued + // Note the trailing ' in the next line. /// 01: continued + get foo => bar();' // /// 01: continued /// 01: continued - String bar( // //# 01: continued \ No newline at end of file + String bar( // /// 01: continued \ No newline at end of file diff --git a/tests/language_strong/regress_23500_test.dart b/tests/language_strong/regress_23500_test.dart index af867c2e77e..bd183f93237 100644 --- a/tests/language_strong/regress_23500_test.dart +++ b/tests/language_strong/regress_23500_test.dart @@ -8,8 +8,8 @@ import "package:expect/expect.dart"; foo() async { try { try { - await for (var c in new Stream.fromIterable([])) {} // //# 01: ok - await 0; // //# 02: ok + await for (var c in new Stream.fromIterable([])) {} // /// 01: ok + await 0; // /// 02: ok } catch (error) { } } catch (error) { diff --git a/tests/language_strong/reify_typevar_static_test.dart b/tests/language_strong/reify_typevar_static_test.dart index 8c547a44f36..fb9bf9acb3a 100644 --- a/tests/language_strong/reify_typevar_static_test.dart +++ b/tests/language_strong/reify_typevar_static_test.dart @@ -9,16 +9,16 @@ class C { C([this.x]); static staticFunction(bool b) => - b ? T : // //# 00: compile-time error + b ? T : // /// 00: compile-time error null; factory C.factoryConstructor(bool b) => new C( - b ? T : // //# 01: ok + b ? T : // /// 01: ok null); C.redirectingConstructor(bool b) : this( - b ? T : // //# 02: ok + b ? T : // /// 02: ok null); C.ordinaryConstructor(bool b) : x = - b ? T : // //# 03: ok + b ? T : // /// 03: ok null; } diff --git a/tests/language_strong/rewrite_implicit_this_test.dart b/tests/language_strong/rewrite_implicit_this_test.dart index f4e24d24333..5d816696539 100644 --- a/tests/language_strong/rewrite_implicit_this_test.dart +++ b/tests/language_strong/rewrite_implicit_this_test.dart @@ -10,30 +10,30 @@ class Foo { String x = 'x'; easy(z) { - return x + y + z; //# 01: static type warning + return x + y + z; /// 01: static type warning } // Shadow the 'y' field in various ways shadow_y_parameter(y) { - return x + this.y + y; //# 01: continued + return x + this.y + y; /// 01: continued } shadow_y_local(z) { var y = z; - return x + this.y + y; //# 01: continued + return x + this.y + y; /// 01: continued } shadow_y_capturedLocal(z) { var y = z; foo() { - return x + this.y + y; //# 01: continued + return x + this.y + y; /// 01: continued } return foo(); } shadow_y_closureParam(z) { foo(y) { - return x + this.y + y; //# 01: continued + return x + this.y + y; /// 01: continued } return foo(z); } @@ -41,32 +41,32 @@ class Foo { shadow_y_localInsideClosure(z) { foo() { var y = z; - return x + this.y + y; //# 01: continued + return x + this.y + y; /// 01: continued } return foo(); } // Shadow the 'x' field in various ways shadow_x_parameter(x) { - return this.x + y + x; //# 01: continued + return this.x + y + x; /// 01: continued } shadow_x_local(z) { var x = z; - return this.x + y + x; //# 01: continued + return this.x + y + x; /// 01: continued } shadow_x_capturedLocal(z) { var x = z; foo() { - return this.x + y + x; //# 01: continued + return this.x + y + x; /// 01: continued } return foo(); } shadow_x_closureParam(z) { foo(x) { - return this.x + y + x; //# 01: continued + return this.x + y + x; /// 01: continued } return foo(z); } @@ -74,13 +74,13 @@ class Foo { shadow_x_localInsideClosure(z) { foo() { var x = z; - return this.x + y + x; //# 01: continued + return this.x + y + x; /// 01: continued } return foo(); } shadow_x_toplevel() { - return x + this.y + toplevel + this.toplevel; //# 01: continued + return x + this.y + toplevel + this.toplevel; /// 01: continued } } @@ -91,17 +91,17 @@ class Sub extends Foo { } main() { - Expect.equals('xyz', new Sub().easy('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_y_parameter('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_y_local('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_y_capturedLocal('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_y_closureParam('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_y_localInsideClosure('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_x_parameter('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_x_local('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_x_capturedLocal('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_x_closureParam('z')); //# 01: continued - Expect.equals('xyz', new Sub().shadow_x_localInsideClosure('z')); //# 01: continued + Expect.equals('xyz', new Sub().easy('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_y_parameter('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_y_local('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_y_capturedLocal('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_y_closureParam('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_y_localInsideClosure('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_x_parameter('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_x_local('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_x_capturedLocal('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_x_closureParam('z')); /// 01: continued + Expect.equals('xyz', new Sub().shadow_x_localInsideClosure('z')); /// 01: continued - Expect.equals('xyAB', new Sub().shadow_x_toplevel()); //# 01: continued + Expect.equals('xyAB', new Sub().shadow_x_toplevel()); /// 01: continued } diff --git a/tests/language_strong/scope_variable_test.dart b/tests/language_strong/scope_variable_test.dart index 21b2bdd6622..4c593518cfb 100644 --- a/tests/language_strong/scope_variable_test.dart +++ b/tests/language_strong/scope_variable_test.dart @@ -35,7 +35,7 @@ int testShadowingAfterUse() { var c = a; // Use of 'a' prior to its shadow declaration below. var d = b + c; // Shadow declaration of 'a'. - var a = 5; //# 01: compile-time error + var a = 5; /// 01: compile-time error return d + a; } } diff --git a/tests/language_strong/setter3_test.dart b/tests/language_strong/setter3_test.dart index 9033421d6ef..3253a6e27ca 100644 --- a/tests/language_strong/setter3_test.dart +++ b/tests/language_strong/setter3_test.dart @@ -9,8 +9,8 @@ class A { set foo(x) {} void set bar(x) {} - dynamic set baz(x) {} //# 01: static type warning - bool set bob(x) {} //# 02: static type warning + dynamic set baz(x) {} /// 01: static type warning + bool set bob(x) {} /// 02: static type warning } main() { diff --git a/tests/language_strong/setter_no_getter_call_test.dart b/tests/language_strong/setter_no_getter_call_test.dart index 5ba2bb931b7..a7d577ef9a6 100644 --- a/tests/language_strong/setter_no_getter_call_test.dart +++ b/tests/language_strong/setter_no_getter_call_test.dart @@ -6,9 +6,9 @@ import "package:expect/expect.dart"; var topLevelClosure; -/* // //# 01: runtime error +/* // /// 01: runtime error get topLevel => topLevelClosure; -*/ // //# 01: continued +*/ // /// 01: continued set topLevel(var value) { } initialize() { diff --git a/tests/language_strong/setter_no_getter_test.dart b/tests/language_strong/setter_no_getter_test.dart index c538238e659..00fb081bc43 100644 --- a/tests/language_strong/setter_no_getter_test.dart +++ b/tests/language_strong/setter_no_getter_test.dart @@ -4,11 +4,11 @@ import "package:expect/expect.dart"; -/* // //# 01: runtime error +/* // /// 01: runtime error get topLevel => 42; -*/ // //# 01: continued +*/ // /// 01: continued set topLevel(var value) { } main() { - Expect.equals(42, topLevel++); //# 01: continued + Expect.equals(42, topLevel++); /// 01: continued } diff --git a/tests/language_strong/setter_override2_test.dart b/tests/language_strong/setter_override2_test.dart index 1f0324284b6..d0a10f92b6a 100644 --- a/tests/language_strong/setter_override2_test.dart +++ b/tests/language_strong/setter_override2_test.dart @@ -10,10 +10,10 @@ import "package:expect/expect.dart"; import "package:meta/meta.dart" show virtual; class A { - @virtual var foo = 42; // //# 00: ok - get foo => 42; // //# 01: ok - foo() => 42; // //# 02: ok - set foo(value) { } // //# 03: ok + @virtual var foo = 42; // /// 00: ok + get foo => 42; // /// 01: ok + foo() => 42; // /// 02: ok + set foo(value) { } // /// 03: ok } class B extends A { diff --git a/tests/language_strong/setter_override_test.dart b/tests/language_strong/setter_override_test.dart index cffd1d925a4..4b4d868b4a3 100644 --- a/tests/language_strong/setter_override_test.dart +++ b/tests/language_strong/setter_override_test.dart @@ -10,10 +10,10 @@ import "package:expect/expect.dart"; class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: static type warning - foo() => 42; // //# 02: static type warning - set foo(value) { } // //# 03: compile-time error + var foo = 42; // /// 00: compile-time error + get foo => 42; // /// 01: static type warning + foo() => 42; // /// 02: static type warning + set foo(value) { } // /// 03: compile-time error } class B extends A { diff --git a/tests/language_strong/stacktrace_rethrow_error_test.dart b/tests/language_strong/stacktrace_rethrow_error_test.dart index e4e2c6f9040..b7c7fb2c4e4 100644 --- a/tests/language_strong/stacktrace_rethrow_error_test.dart +++ b/tests/language_strong/stacktrace_rethrow_error_test.dart @@ -13,10 +13,10 @@ aa1() { bb1(); fail(); } catch(error - , stacktrace // //# withtraceparameter: ok + , stacktrace // /// withtraceparameter: ok ) { expectTrace(['gg1', 'ff1', 'ee1', 'dd1', 'cc1', 'bb1', 'aa1'], error.stackTrace); - expectTrace(['gg1', 'ff1', 'ee1', 'dd1', 'cc1', 'bb1', 'aa1'], stacktrace); // //# withtraceparameter: continued + expectTrace(['gg1', 'ff1', 'ee1', 'dd1', 'cc1', 'bb1', 'aa1'], stacktrace); // /// withtraceparameter: continued } } @@ -53,10 +53,10 @@ aa2() { bb2(); fail(); } catch(error - , stacktrace // //# withtraceparameter: continued + , stacktrace // /// withtraceparameter: continued ) { expectTrace(['gg2', 'ff2', 'ee2', 'dd2', 'cc2', 'bb2', 'aa2'], error.stackTrace); - expectTrace(['gg2', 'ff2', 'ee2', 'dd2', 'cc2', 'bb2', 'aa2'], stacktrace); // //# withtraceparameter: continued + expectTrace(['gg2', 'ff2', 'ee2', 'dd2', 'cc2', 'bb2', 'aa2'], stacktrace); // /// withtraceparameter: continued } } @@ -93,10 +93,10 @@ aa3() { bb3(); fail(); } catch(error - , stacktrace // //# withtraceparameter: continued + , stacktrace // /// withtraceparameter: continued ) { expectTrace(['gg3', 'ff3', 'ee3', 'dd3', 'cc3', 'bb3', 'aa3'], error.stackTrace); - expectTrace(['cc3', 'bb3', 'aa3'], stacktrace); // //# withtraceparameter: continued + expectTrace(['cc3', 'bb3', 'aa3'], stacktrace); // /// withtraceparameter: continued } } diff --git a/tests/language_strong/static_field3_test.dart b/tests/language_strong/static_field3_test.dart index 7e4969398d4..079a1732092 100644 --- a/tests/language_strong/static_field3_test.dart +++ b/tests/language_strong/static_field3_test.dart @@ -11,9 +11,9 @@ class Foo { main() { if (false) { - var x = Foo.x; // //# 01: static type warning - var m = Foo.m; // //# 02: static type warning - Foo.m = 1; // //# 03: static type warning - Foo.x = 1; // //# 04: static type warning + var x = Foo.x; // /// 01: static type warning + var m = Foo.m; // /// 02: static type warning + Foo.m = 1; // /// 03: static type warning + Foo.x = 1; // /// 04: static type warning } } diff --git a/tests/language_strong/static_field_test.dart b/tests/language_strong/static_field_test.dart index ae245962500..d7aa5734560 100644 --- a/tests/language_strong/static_field_test.dart +++ b/tests/language_strong/static_field_test.dart @@ -65,7 +65,7 @@ class StaticFieldTest { class StaticField1RunNegativeTest { - static // //# 01: static type warning, runtime error + static // /// 01: static type warning, runtime error var x; testMain() { var foo = new StaticField1RunNegativeTest(); @@ -75,7 +75,7 @@ class StaticField1RunNegativeTest { } class StaticField1aRunNegativeTest { - static // //# 02: static type warning, runtime error + static // /// 02: static type warning, runtime error void m() {} testMain() { @@ -86,7 +86,7 @@ class StaticField1aRunNegativeTest { } class StaticField2RunNegativeTest { - static //# 03: static type warning, runtime error + static /// 03: static type warning, runtime error var x; testMain() { @@ -97,13 +97,13 @@ class StaticField2RunNegativeTest { } class StaticField2aRunNegativeTest { - static // //# 04: static type warning, runtime error + static // /// 04: static type warning, runtime error void m() {} testMain() { var foo = new StaticField2aRunNegativeTest(); print(m); // Used to compile 'm' and force any errors. - foo.m = 1; //# 04:continued + foo.m = 1; /// 04:continued } } diff --git a/tests/language_strong/static_final_field2_test.dart b/tests/language_strong/static_final_field2_test.dart index 8a148267b7a..82e281e7957 100644 --- a/tests/language_strong/static_final_field2_test.dart +++ b/tests/language_strong/static_final_field2_test.dart @@ -10,13 +10,13 @@ class A { class B { const B() : n = 5; final n; - static const a; // //# 02: compile-time error + static const a; // /// 02: compile-time error static const b = 3 + 5; } main() { - A.x = 2; // //# 01: static type warning, runtime error + A.x = 2; // /// 01: static type warning, runtime error new B(); print(B.b); - print(B.a); // //# 02: continued + print(B.a); // /// 02: continued } diff --git a/tests/language_strong/static_getter_no_setter1_test.dart b/tests/language_strong/static_getter_no_setter1_test.dart index 44d266d307c..431bbdc2a6c 100644 --- a/tests/language_strong/static_getter_no_setter1_test.dart +++ b/tests/language_strong/static_getter_no_setter1_test.dart @@ -13,12 +13,12 @@ class Class { method() { try { - getter++; //# 01: static type warning + getter++; /// 01: static type warning } on NoSuchMethodError catch(e) { - Expect.isTrue(getter_visited); //# 01: continued + Expect.isTrue(getter_visited); /// 01: continued return; } - Expect.fail('Expected NoSuchMethodError'); //# 01: continued + Expect.fail('Expected NoSuchMethodError'); /// 01: continued } } diff --git a/tests/language_strong/static_getter_no_setter2_test.dart b/tests/language_strong/static_getter_no_setter2_test.dart index 2bbfe624130..508f175bead 100644 --- a/tests/language_strong/static_getter_no_setter2_test.dart +++ b/tests/language_strong/static_getter_no_setter2_test.dart @@ -9,11 +9,11 @@ class Class { method() { try { - getter++; //# 01: static type warning + getter++; /// 01: static type warning } on NoSuchMethodError catch(e) { return; } - Expect.fail('Expected NoSuchMethodError'); //# 01: continued + Expect.fail('Expected NoSuchMethodError'); /// 01: continued } noSuchMethod(i) { @@ -23,7 +23,7 @@ class Class { class Subclass extends Class { method() { - print(getter); //# 01: continued + print(getter); /// 01: continued super.method(); } } diff --git a/tests/language_strong/static_getter_no_setter3_test.dart b/tests/language_strong/static_getter_no_setter3_test.dart index 450cb61573e..c466e7dc7cd 100644 --- a/tests/language_strong/static_getter_no_setter3_test.dart +++ b/tests/language_strong/static_getter_no_setter3_test.dart @@ -13,12 +13,12 @@ class Class { method() { try { - getter++; //# 01: static type warning + getter++; /// 01: static type warning } on NoSuchMethodError catch(e) { - Expect.isTrue(getter_visited); //# 01: continued + Expect.isTrue(getter_visited); /// 01: continued return; } - Expect.fail('Expected NoSuchMethodError'); //# 01: continued + Expect.fail('Expected NoSuchMethodError'); /// 01: continued } } diff --git a/tests/language_strong/static_parameter_test.dart b/tests/language_strong/static_parameter_test.dart index 437883f698b..0f91a71d425 100644 --- a/tests/language_strong/static_parameter_test.dart +++ b/tests/language_strong/static_parameter_test.dart @@ -3,48 +3,48 @@ // BSD-style license that can be found in the LICENSE file. foo(x - , static int y // //# 01: compile-time error - , final static y // //# 02: compile-time error - , {static y} // //# 03: compile-time error - , [static y] // //# 04: compile-time error + , static int y // /// 01: compile-time error + , final static y // /// 02: compile-time error + , {static y} // /// 03: compile-time error + , [static y] // /// 04: compile-time error ) { } class C { bar(x - , static int y // //# 05: compile-time error - , final static y // //# 06: compile-time error - , {static y} // //# 07: compile-time error - , [static y] // //# 08: compile-time error + , static int y // /// 05: compile-time error + , final static y // /// 06: compile-time error + , {static y} // /// 07: compile-time error + , [static y] // /// 08: compile-time error ) { } static baz(x - , static int y // //# 09: compile-time error - , final static y // //# 10: compile-time error - , {static y} // //# 11: compile-time error - , [static y] // //# 12: compile-time error + , static int y // /// 09: compile-time error + , final static y // /// 10: compile-time error + , {static y} // /// 11: compile-time error + , [static y] // /// 12: compile-time error ) { } } main() { foo(1 - , 1 // //# 01: continued - , 1 // //# 02: continued - , y: 1 // //# 03: continued - , 1 // //# 04: continued + , 1 // /// 01: continued + , 1 // /// 02: continued + , y: 1 // /// 03: continued + , 1 // /// 04: continued ); new C().bar(1 - , 1 // //# 05: continued - , 1 // //# 06: continued - , y: 1 // //# 07: continued - , 1 // //# 08: continued + , 1 // /// 05: continued + , 1 // /// 06: continued + , y: 1 // /// 07: continued + , 1 // /// 08: continued ); C.baz(1 - , 1 // //# 09: continued - , 1 // //# 10: continued - , y: 1 // //# 11: continued - , 1 // //# 12: continued + , 1 // /// 09: continued + , 1 // /// 10: continued + , y: 1 // /// 11: continued + , 1 // /// 12: continued ); } diff --git a/tests/language_strong/static_setter_get_test.dart b/tests/language_strong/static_setter_get_test.dart index 1680a2d3c44..a10c1d92059 100644 --- a/tests/language_strong/static_setter_get_test.dart +++ b/tests/language_strong/static_setter_get_test.dart @@ -6,10 +6,10 @@ import 'package:expect/expect.dart'; class Class { static set o(_) {} - m() => o; //# 01: static type warning + m() => o; /// 01: static type warning noSuchMethod(_) => 42; } main() { - Expect.throws(() => new Class().m()); //# 01: continued + Expect.throws(() => new Class().m()); /// 01: continued } \ No newline at end of file diff --git a/tests/language_strong/static_top_level_test.dart b/tests/language_strong/static_top_level_test.dart index 6b0a791f275..d6e155818b9 100644 --- a/tests/language_strong/static_top_level_test.dart +++ b/tests/language_strong/static_top_level_test.dart @@ -2,15 +2,15 @@ // 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. -static method() { } // //# 00: compile-time error -static var field; // //# 01: compile-time error -static const finalField = 42; // //# 02: compile-time error -static const constant = 123; // //# 03: compile-time error +static method() { } // /// 00: compile-time error +static var field; // /// 01: compile-time error +static const finalField = 42; // /// 02: compile-time error +static const constant = 123; // /// 03: compile-time error -static int typedMethod() => 87; // //# 04: compile-time error -static int typedField; // //# 05: compile-time error -static const int typedFinalField = 99; //# 06: compile-time error -static const int typedConstant = 1; // //# 07: compile-time error +static int typedMethod() => 87; // /// 04: compile-time error +static int typedField; // /// 05: compile-time error +static const int typedFinalField = 99; /// 06: compile-time error +static const int typedConstant = 1; // /// 07: compile-time error void main() { } diff --git a/tests/language_strong/string_interpolation9_test.dart b/tests/language_strong/string_interpolation9_test.dart index e52db05fd63..ec89d324b0e 100644 --- a/tests/language_strong/string_interpolation9_test.dart +++ b/tests/language_strong/string_interpolation9_test.dart @@ -7,29 +7,29 @@ main() { var x; - x = "$"; // //# 1: compile-time error - x = "x$"; // //# 2: compile-time error - x = "$x$"; // //# 3: compile-time error - x = "$$x"; // //# 4: compile-time error - x = "$ "; // //# 5: compile-time error + x = "$"; // /// 1: compile-time error + x = "x$"; // /// 2: compile-time error + x = "$x$"; // /// 3: compile-time error + x = "$$x"; // /// 4: compile-time error + x = "$ "; // /// 5: compile-time error - x = '$'; // //# 6: compile-time error - x = 'x$'; // //# 7: compile-time error - x = '$x$'; // //# 8: compile-time error - x = '$$x'; // //# 9: compile-time error - x = '$ '; // //# 10: compile-time error + x = '$'; // /// 6: compile-time error + x = 'x$'; // /// 7: compile-time error + x = '$x$'; // /// 8: compile-time error + x = '$$x'; // /// 9: compile-time error + x = '$ '; // /// 10: compile-time error - x = """$"""; // //# 11: compile-time error - x = """x$"""; // //# 12: compile-time error - x = """$x$"""; // //# 13: compile-time error - x = """$$x"""; // //# 14: compile-time error - x = """$ """; // //# 15: compile-time error + x = """$"""; // /// 11: compile-time error + x = """x$"""; // /// 12: compile-time error + x = """$x$"""; // /// 13: compile-time error + x = """$$x"""; // /// 14: compile-time error + x = """$ """; // /// 15: compile-time error - x = '''$'''; // //# 16: compile-time error - x = '''x$'''; // //# 17: compile-time error - x = '''$x$'''; // //# 18: compile-time error - x = '''$$x'''; // //# 19: compile-time error - x = '''$ '''; // //# 20: compile-time error + x = '''$'''; // /// 16: compile-time error + x = '''x$'''; // /// 17: compile-time error + x = '''$x$'''; // /// 18: compile-time error + x = '''$$x'''; // /// 19: compile-time error + x = '''$ '''; // /// 20: compile-time error return x; } diff --git a/tests/language_strong/string_interpolation_test.dart b/tests/language_strong/string_interpolation_test.dart index ab59045400c..5a4f897c0c3 100644 --- a/tests/language_strong/string_interpolation_test.dart +++ b/tests/language_strong/string_interpolation_test.dart @@ -59,7 +59,7 @@ class StringInterpolationTest { Expect.equals("}", "escaped \${3+2}"[17]); if (alwaysFalse) { - "${i.toHorse()}"; //# 01: static type warning + "${i.toHorse()}"; /// 01: static type warning } Expect.equals("${m}", "$m"); diff --git a/tests/language_strong/substring_test.dart b/tests/language_strong/substring_test.dart index ccc92f6ffd5..e2dc3f1712a 100644 --- a/tests/language_strong/substring_test.dart +++ b/tests/language_strong/substring_test.dart @@ -8,8 +8,8 @@ import "package:expect/expect.dart"; main() { try { - print("abcdef".substring(1.5, 3.5)); // //# 01: static type warning - Expect.fail("Should have thrown an exception"); // //# 01: continued + print("abcdef".substring(1.5, 3.5)); // /// 01: static type warning + Expect.fail("Should have thrown an exception"); // /// 01: continued } on TypeError catch (e) { // OK. } on ArgumentError catch (e) { diff --git a/tests/language_strong/super_bound_closure_test.dart b/tests/language_strong/super_bound_closure_test.dart index 6a2cd2b8931..8e02e31f6a9 100644 --- a/tests/language_strong/super_bound_closure_test.dart +++ b/tests/language_strong/super_bound_closure_test.dart @@ -72,15 +72,15 @@ class B extends A { fooIntercept27() => confuse(super.lastWhere)(0); fooIntercept28() => confuse(super.lastWhere)(3, orElse: 77); - bar([var optional]) => -1; // //# 01: static type warning - bar2({ namedOptional }) => -1; // //# 01: continued - bar3(x, [var optional]) => -1; // //# 01: continued - bar4(x, { namedOptional }) => -1; //# 01: continued + bar([var optional]) => -1; // /// 01: static type warning + bar2({ namedOptional }) => -1; // /// 01: continued + bar3(x, [var optional]) => -1; // /// 01: continued + bar4(x, { namedOptional }) => -1; /// 01: continued - gee([var optional]) => -1; // //# 01: continued - gee2({ namedOptional }) => -1; // //# 01: continued - gee3(x, [var optional]) => -1; // //# 01: continued - gee4(x, { namedOptional }) => -1; //# 01: continued + gee([var optional]) => -1; // /// 01: continued + gee2({ namedOptional }) => -1; // /// 01: continued + gee3(x, [var optional]) => -1; // /// 01: continued + gee4(x, { namedOptional }) => -1; /// 01: continued add([var optional = 33]) => -1; trim({ namedOptional: 22 }) => -1; @@ -106,27 +106,27 @@ main() { var ignored2 = list[confuse(3)]; var t = b.gee() + b.gee2() + b.gee3(9) + b.gee4(19); - Expect.equals(-4, t); //# 01: continued + Expect.equals(-4, t); /// 01: continued t = b.shuffle() + b.toList() + b.lastIndexOf(1) + b.lastWhere(2); Expect.equals(-4, t); - Expect.equals(499, b.foo()); // //# 01: continued - Expect.equals(500, b.foo2()); //# 01: continued - Expect.equals(42, b.foo3()); // //# 01: continued - Expect.equals(117, b.foo4()); //# 01: continued - Expect.equals(498, b.foo5()); //# 01: continued - Expect.equals(468, b.foo6()); //# 01: continued - Expect.equals(426, b.foo7()); //# 01: continued - Expect.equals(502, b.foo8()); //# 01: continued + Expect.equals(499, b.foo()); // /// 01: continued + Expect.equals(500, b.foo2()); /// 01: continued + Expect.equals(42, b.foo3()); // /// 01: continued + Expect.equals(117, b.foo4()); /// 01: continued + Expect.equals(498, b.foo5()); /// 01: continued + Expect.equals(468, b.foo6()); /// 01: continued + Expect.equals(426, b.foo7()); /// 01: continued + Expect.equals(502, b.foo8()); /// 01: continued - Expect.equals(499, b.fooGee()); // //# 01: continued - Expect.equals(500, b.fooGee2()); //# 01: continued - Expect.equals(42, b.fooGee3()); // //# 01: continued - Expect.equals(117, b.fooGee4()); //# 01: continued - Expect.equals(498, b.fooGee5()); //# 01: continued - Expect.equals(468, b.fooGee6()); //# 01: continued - Expect.equals(426, b.fooGee7()); //# 01: continued - Expect.equals(502, b.fooGee8()); //# 01: continued + Expect.equals(499, b.fooGee()); // /// 01: continued + Expect.equals(500, b.fooGee2()); /// 01: continued + Expect.equals(42, b.fooGee3()); // /// 01: continued + Expect.equals(117, b.fooGee4()); /// 01: continued + Expect.equals(498, b.fooGee5()); /// 01: continued + Expect.equals(468, b.fooGee6()); /// 01: continued + Expect.equals(426, b.fooGee7()); /// 01: continued + Expect.equals(502, b.fooGee8()); /// 01: continued Expect.equals(1267, b.fooIntercept()); Expect.equals(1236, b.fooIntercept2()); diff --git a/tests/language_strong/super_call3_test.dart b/tests/language_strong/super_call3_test.dart index 56762fc0ea0..a477cfa15b7 100644 --- a/tests/language_strong/super_call3_test.dart +++ b/tests/language_strong/super_call3_test.dart @@ -8,7 +8,7 @@ import "package:expect/expect.dart"; class A { A( - this.x // //# 01: compile-time error + this.x // /// 01: compile-time error ); final foo = 499; } @@ -23,7 +23,7 @@ class B2 extends A { class C { C - .named // //# 02: compile-time error + .named // /// 02: compile-time error (); final foo = 499; } diff --git a/tests/language_strong/super_conditional_operator_test.dart b/tests/language_strong/super_conditional_operator_test.dart index 52befc38545..100a9a4c979 100644 --- a/tests/language_strong/super_conditional_operator_test.dart +++ b/tests/language_strong/super_conditional_operator_test.dart @@ -13,27 +13,27 @@ class B { class C extends B { C() - : super?.namedConstructor() //# 01: compile-time error + : super?.namedConstructor() /// 01: compile-time error ; test() { - super?.field = 1; //# 02: compile-time error - super?.field += 1; //# 03: compile-time error - super?.field ??= 1; //# 04: compile-time error - super?.field; //# 05: compile-time error - 1 * super?.field; //# 06: compile-time error - -super?.field; //# 07: compile-time error - ~super?.field; //# 08: compile-time error - !super?.field; //# 09: compile-time error - --super?.field; //# 10: compile-time error - ++super?.field; //# 11: compile-time error - super?.method(); //# 12: compile-time error - 1 * super?.method(); //# 13: compile-time error - -super?.method(); //# 14: compile-time error - ~super?.method(); //# 15: compile-time error - !super?.method(); //# 16: compile-time error - --super?.method(); //# 17: compile-time error - ++super?.method(); //# 18: compile-time error + super?.field = 1; /// 02: compile-time error + super?.field += 1; /// 03: compile-time error + super?.field ??= 1; /// 04: compile-time error + super?.field; /// 05: compile-time error + 1 * super?.field; /// 06: compile-time error + -super?.field; /// 07: compile-time error + ~super?.field; /// 08: compile-time error + !super?.field; /// 09: compile-time error + --super?.field; /// 10: compile-time error + ++super?.field; /// 11: compile-time error + super?.method(); /// 12: compile-time error + 1 * super?.method(); /// 13: compile-time error + -super?.method(); /// 14: compile-time error + ~super?.method(); /// 15: compile-time error + !super?.method(); /// 16: compile-time error + --super?.method(); /// 17: compile-time error + ++super?.method(); /// 18: compile-time error } } diff --git a/tests/language_strong/super_operator_index_test.dart b/tests/language_strong/super_operator_index_test.dart index 10b7a36c41b..36c6819fee2 100644 --- a/tests/language_strong/super_operator_index_test.dart +++ b/tests/language_strong/super_operator_index_test.dart @@ -11,8 +11,8 @@ class A { class B extends A { foo() { super[4] = 42; - super[4] += 5; //# 01: static type warning, runtime error - return super[2]; //# 02: static type warning, runtime error + super[4] += 5; /// 01: static type warning, runtime error + return super[2]; /// 02: static type warning, runtime error } } @@ -22,17 +22,17 @@ class C { class D extends C { foo() { - super[4] = 42; //# 03: static type warning, runtime error - super[4] += 5; //# 04: static type warning, runtime error + super[4] = 42; /// 03: static type warning, runtime error + super[4] += 5; /// 04: static type warning, runtime error return super[2]; } } class E { foo() { - super[4] = 42; //# 05: static type warning, runtime error - super[4] += 5; //# 06: static type warning, runtime error - return super[2]; //# 07: static type warning, runtime error + super[4] = 42; /// 05: static type warning, runtime error + super[4] += 5; /// 06: static type warning, runtime error + return super[2]; /// 07: static type warning, runtime error } } diff --git a/tests/language_strong/super_setter_test.dart b/tests/language_strong/super_setter_test.dart index f5be4008815..4a9792f3f99 100644 --- a/tests/language_strong/super_setter_test.dart +++ b/tests/language_strong/super_setter_test.dart @@ -10,7 +10,7 @@ class Base { String value_; String get value { return value_; } - String set value(String newValue) { //# static warning + String set value(String newValue) { /// static warning value_ = 'Base:$newValue'; } } @@ -19,7 +19,7 @@ class Base { class Derived extends Base { Derived() : super() {} - String set value(String newValue) { //# static warning + String set value(String newValue) { /// static warning super.value = 'Derived:$newValue'; } String get value { return super.value; } diff --git a/tests/language_strong/switch_bad_case_test.dart b/tests/language_strong/switch_bad_case_test.dart index 29c2843d44b..7b9e9997cbb 100644 --- a/tests/language_strong/switch_bad_case_test.dart +++ b/tests/language_strong/switch_bad_case_test.dart @@ -19,18 +19,18 @@ caesarSays(n) { return "I"; case 4: return "IV"; - case "M": // //# 01: compile-time error - return 1000; // //# 01: continued + case "M": // /// 01: compile-time error + return 1000; // /// 01: continued } return null; } archimedesSays(n) { - switch (n) { // //# 02: continued - case 3.14: // //# 02: compile-time error - return "Pi"; // //# 02: continued - case 2.71828: // //# 02: continued - return "Huh?"; // //# 02: continued - } // //# 02: continued + switch (n) { // /// 02: continued + case 3.14: // /// 02: compile-time error + return "Pi"; // /// 02: continued + case 2.71828: // /// 02: continued + return "Huh?"; // /// 02: continued + } // /// 02: continued return null; } diff --git a/tests/language_strong/switch_case_test.dart b/tests/language_strong/switch_case_test.dart index 2ed1df5b284..8d0b80d5ac2 100644 --- a/tests/language_strong/switch_case_test.dart +++ b/tests/language_strong/switch_case_test.dart @@ -14,7 +14,7 @@ class A { class B implements A { const B(); - operator ==(o) => true; // //# 00: compile-time error + operator ==(o) => true; // /// 00: compile-time error } class C implements A { @@ -30,18 +30,18 @@ class D implements C { main() { switch (new B()) { - case const A.B(): Expect.fail("bad switch"); break; // //# 00: continued + case const A.B(): Expect.fail("bad switch"); break; // /// 00: continued } switch (new C()) { case const C(): Expect.fail("bad switch"); break; case const A.C(): Expect.fail("bad switch"); break; case const A.C2(): Expect.fail("bad switch"); break; - case const A(): Expect.fail("bad switch"); break; // //# 01: compile-time error + case const A(): Expect.fail("bad switch"); break; // /// 01: compile-time error } switch (new A()) { case const A(): Expect.fail("bad switch"); break; - case const A.B(): Expect.fail("bad switch"); break; // //# 02: compile-time error + case const A.B(): Expect.fail("bad switch"); break; // /// 02: compile-time error } } diff --git a/tests/language_strong/symbol_literal_test.dart b/tests/language_strong/symbol_literal_test.dart index dcb413662f1..b4520ba7240 100644 --- a/tests/language_strong/symbol_literal_test.dart +++ b/tests/language_strong/symbol_literal_test.dart @@ -42,5 +42,5 @@ main() { Expect.equals(1, m[#B]); // Tries to call the symbol literal #a.toString - Expect.throws(() => #a.toString(), (e) => e is NoSuchMethodError); //# 01: static type warning + Expect.throws(() => #a.toString(), (e) => e is NoSuchMethodError); /// 01: static type warning } diff --git a/tests/language_strong/sync_generator1_test.dart b/tests/language_strong/sync_generator1_test.dart index 9d517e988b8..6c2b7d701eb 100644 --- a/tests/language_strong/sync_generator1_test.dart +++ b/tests/language_strong/sync_generator1_test.dart @@ -44,7 +44,7 @@ einsZwei() sync* { dreiVier() sync* { // Throws type error: yielded object is not an iterable. - yield* 3; //# 01: static type warning + yield* 3; /// 01: static type warning } main() { @@ -80,6 +80,6 @@ main() { print(einsZwei()); Expect.equals("(1, 2, 3, 5, [6])", einsZwei().toString()); - Expect.throws(() => dreiVier().toString()); //# 01: continued + Expect.throws(() => dreiVier().toString()); /// 01: continued } } diff --git a/tests/language_strong/sync_generator2_test.dart b/tests/language_strong/sync_generator2_test.dart index f4241b34190..82d58639164 100644 --- a/tests/language_strong/sync_generator2_test.dart +++ b/tests/language_strong/sync_generator2_test.dart @@ -13,38 +13,38 @@ var await = "topLevelAwait"; var yield = "topLevelYield"; test01() sync* { - var yield = 0; // //# 01: compile-time error - var await = 0; // //# 02: compile-time error - var async = 0; // //# 03: compile-time error - bool yield() => false; //# 04: compile-time error - bool await() => false; //# 05: compile-time error - bool async() => false; //# 06: compile-time error + var yield = 0; // /// 01: compile-time error + var await = 0; // /// 02: compile-time error + var async = 0; // /// 03: compile-time error + bool yield() => false; /// 04: compile-time error + bool await() => false; /// 05: compile-time error + bool async() => false; /// 06: compile-time error var x1 = sync; - var x2 = async; // //# 07: compile-time error - var x3 = await; // //# 08: compile-time error - var x4 = await 55; // //# 09: compile-time error - var x4 = yield; // //# 10: compile-time error + var x2 = async; // /// 07: compile-time error + var x3 = await; // /// 08: compile-time error + var x4 = await 55; // /// 09: compile-time error + var x4 = yield; // /// 10: compile-time error var stream = new Stream.fromIterable([1, 2, 3]); - await for (var e in stream) print(e); // //# 11: compile-time error + await for (var e in stream) print(e); // /// 11: compile-time error } test02() sync* { yield 12321; - return null; // //# 20: compile-time error + return null; // /// 20: compile-time error } -test03() sync* => null; // //# 30: compile-time error +test03() sync* => null; // /// 30: compile-time error -get test04 sync* => null; // //# 40: compile-time error -set test04(a) sync* { print(a); } // //# 41: compile-time error +get test04 sync* => null; // /// 40: compile-time error +set test04(a) sync* { print(a); } // /// 41: compile-time error class K { - K() sync* {}; // //# 50: compile-time error + K() sync* {}; // /// 50: compile-time error get nix sync* { } - get garnix sync* => null; // //# 51: compile-time error - set etwas(var z) sync* { } // //# 52: compile-time error + get garnix sync* => null; // /// 51: compile-time error + set etwas(var z) sync* { } // /// 52: compile-time error sync() sync* { yield sync; // Yields a tear-off of the sync() method. } @@ -55,13 +55,13 @@ main() { x = test01(); Expect.equals("()", x.toString()); x = test02(); - test03(); //# 30: continued + test03(); /// 30: continued Expect.equals("(12321)", x.toString()); - x = test04; // //# 40: continued - test04 = x; // //# 41: continued + x = test04; // /// 40: continued + test04 = x; // /// 41: continued x = new K(); - print(x.garnix); //# 51: continued - x.etwas = null; //# 52: continued + print(x.garnix); /// 51: continued + x.etwas = null; /// 52: continued print(x.sync().toList()); Expect.equals(1, x.sync().length); // Expect.isTrue(x.sync().single is Function); diff --git a/tests/language_strong/sync_generator3_test.dart b/tests/language_strong/sync_generator3_test.dart index d145736e545..55120717806 100644 --- a/tests/language_strong/sync_generator3_test.dart +++ b/tests/language_strong/sync_generator3_test.dart @@ -43,6 +43,6 @@ test2() { } main() { - test1(); // //# test1: ok - test2(); // //# test2: ok + test1(); // /// test1: ok + test2(); // /// test2: ok } \ No newline at end of file diff --git a/tests/language_strong/syncstar_yield_test.dart b/tests/language_strong/syncstar_yield_test.dart index 7122a8fb7d5..2111c21c20d 100644 --- a/tests/language_strong/syncstar_yield_test.dart +++ b/tests/language_strong/syncstar_yield_test.dart @@ -42,15 +42,15 @@ main() { foo2(4).take(10).toList()); Iterable t = foo3(0); Iterator it1 = t.iterator; - Iterator it2 = t.iterator; //# copyParameters: ok + Iterator it2 = t.iterator; /// copyParameters: ok it1.moveNext(); - it2.moveNext(); //# copyParameters: continued + it2.moveNext(); /// copyParameters: continued Expect.equals(2, it1.current); // TODO(sigurdm): Check up on the spec here. - Expect.equals(2, it2.current); // //# copyParameters: continued + Expect.equals(2, it2.current); // /// copyParameters: continued Expect.isFalse(it1.moveNext()); // Test that two `moveNext()` calls are fine. Expect.isFalse(it1.moveNext()); - Expect.isFalse(it2.moveNext()); //# copyParameters: continued - Expect.isFalse(it2.moveNext()); //# copyParameters: continued + Expect.isFalse(it2.moveNext()); /// copyParameters: continued + Expect.isFalse(it2.moveNext()); /// copyParameters: continued } diff --git a/tests/language_strong/syntax_test.dart b/tests/language_strong/syntax_test.dart index 5d0f3da77d3..11aee706152 100644 --- a/tests/language_strong/syntax_test.dart +++ b/tests/language_strong/syntax_test.dart @@ -4,186 +4,186 @@ class SyntaxTest { // "this" cannot be used as a field name. - SyntaxTest this; //# 01: compile-time error + SyntaxTest this; /// 01: compile-time error // Syntax error. - foo {} //# 02: compile-time error + foo {} /// 02: compile-time error // Syntax error. - static foo {} //# 03: compile-time error + static foo {} /// 03: compile-time error // Syntax error. - operator +=() {} //# 04: compile-time error + operator +=() {} /// 04: compile-time error // Syntax error. - operator -=() {} //# 05: compile-time error + operator -=() {} /// 05: compile-time error // Syntax error. - operator *=() {} //# 06: compile-time error + operator *=() {} /// 06: compile-time error // Syntax error. - operator /=() {} //# 07: compile-time error + operator /=() {} /// 07: compile-time error // Syntax error. - operator ~/=() {} //# 08: compile-time error + operator ~/=() {} /// 08: compile-time error // Syntax error. - operator %=() {} //# 09: compile-time error + operator %=() {} /// 09: compile-time error // Syntax error. - operator <<=() {} //# 10: compile-time error + operator <<=() {} /// 10: compile-time error // Syntax error. - operator >>=() {} //# 11: compile-time error + operator >>=() {} /// 11: compile-time error // Syntax error. - operator >>>=() {} //# 12: compile-time error + operator >>>=() {} /// 12: compile-time error // Syntax error. - operator &=() {} //# 13: compile-time error + operator &=() {} /// 13: compile-time error // Syntax error. - operator ^=() {} //# 14: compile-time error + operator ^=() {} /// 14: compile-time error // Syntax error. - operator |=() {} //# 15: compile-time error + operator |=() {} /// 15: compile-time error // Syntax error. - operator ?() {} //# 16: compile-time error + operator ?() {} /// 16: compile-time error // Syntax error. - operator ||() {} //# 17: compile-time error + operator ||() {} /// 17: compile-time error // Syntax error. - operator &&() {} //# 18: compile-time error + operator &&() {} /// 18: compile-time error // Syntax error. - operator !=() {} //# 19: compile-time error + operator !=() {} /// 19: compile-time error // Syntax error. - operator ===() {} //# 20: compile-time error + operator ===() {} /// 20: compile-time error // Syntax error. - operator !==() {} //# 21: compile-time error + operator !==() {} /// 21: compile-time error // Syntax error. - operator is() {} //# 22: compile-time error + operator is() {} /// 22: compile-time error // Syntax error. - operator !() {} //# 23: compile-time error + operator !() {} /// 23: compile-time error // Syntax error. - operator ++() {} //# 24: compile-time error + operator ++() {} /// 24: compile-time error // Syntax error. - operator --() {} //# 25: compile-time error + operator --() {} /// 25: compile-time error // Syntax error. - bool operator ===(A other) { return true; } //# 26: compile-time error + bool operator ===(A other) { return true; } /// 26: compile-time error int sample; } -fisk {} //# 27: compile-time error +fisk {} /// 27: compile-time error class DOMWindow {} class Window extends DOMWindow -native "*Window" //# 28: compile-time error +native "*Window" /// 28: compile-time error {} class Console -native "=(typeof console == 'undefined' ? {} : console)" //# 29: compile-time error +native "=(typeof console == 'undefined' ? {} : console)" /// 29: compile-time error {} class NativeClass -native "FooBar" //# 30: compile-time error +native "FooBar" /// 30: compile-time error {} abstract class Fisk {} class BoolImplementation implements Fisk -native "Boolean" //# 31: compile-time error +native "Boolean" /// 31: compile-time error {} class _JSON -native 'JSON' //# 32: compile-time error +native 'JSON' /// 32: compile-time error {} class ListFactory implements List -native "Array" //# 33: compile-time error +native "Array" /// 33: compile-time error {} -abstract class I implements UNKNOWN; //# 34: compile-time error +abstract class I implements UNKNOWN; /// 34: compile-time error class XWindow extends DOMWindow -hest "*Window" //# 35: compile-time error +hest "*Window" /// 35: compile-time error {} class XConsole -hest "=(typeof console == 'undefined' ? {} : console)" //# 36: compile-time error +hest "=(typeof console == 'undefined' ? {} : console)" /// 36: compile-time error {} class XNativeClass -hest "FooBar" //# 37: compile-time error +hest "FooBar" /// 37: compile-time error {} class XBoolImplementation implements Fisk -hest "Boolean" //# 38: compile-time error +hest "Boolean" /// 38: compile-time error {} class _JSONX -hest 'JSON' //# 39: compile-time error +hest 'JSON' /// 39: compile-time error {} class XListFactory implements List -hest "Array" //# 40: compile-time error +hest "Array" /// 40: compile-time error {} class YWindow extends DOMWindow -for "*Window" //# 41: compile-time error +for "*Window" /// 41: compile-time error {} class YConsole -for "=(typeof console == 'undefined' ? {} : console)" //# 42: compile-time error +for "=(typeof console == 'undefined' ? {} : console)" /// 42: compile-time error {} class YNativeClass -for "FooBar" //# 43: compile-time error +for "FooBar" /// 43: compile-time error {} class YBoolImplementation implements Fisk -for "Boolean" //# 44: compile-time error +for "Boolean" /// 44: compile-time error {} class _JSONY -for 'JSON' //# 45: compile-time error +for 'JSON' /// 45: compile-time error {} class YListFactory implements List -for "Array" //# 46: compile-time error +for "Array" /// 46: compile-time error {} class A { const A() - {} //# 47: compile-time error + {} /// 47: compile-time error ; } abstract class G {} -typedef (); //# 48: compile-time error +typedef (); /// 48: compile-time error class B -extends void //# 49: compile-time error +extends void /// 49: compile-time error {} main() { try { new SyntaxTest(); - new SyntaxTest().foo(); //# 02: continued - SyntaxTest.foo(); //# 03: continued - fisk(); //# 27: continued + new SyntaxTest().foo(); /// 02: continued + SyntaxTest.foo(); /// 03: continued + fisk(); /// 27: continued new Window(); new Console(); @@ -193,7 +193,7 @@ main() { new ListFactory(); new ListFactory(); var x = null; - x is I; //# 34: continued + x is I; /// 34: continued new XConsole(); new XNativeClass(); @@ -210,33 +210,33 @@ main() { new YListFactory(); futureOf(x) {} - if (!(fisk futureOf(false))) {} //# 50: compile-time error - if (!(await futureOf(false))) {} //# 51: compile-time error + if (!(fisk futureOf(false))) {} /// 50: compile-time error + if (!(await futureOf(false))) {} /// 51: compile-time error - void f{} //# 52: compile-time error - G g; //# 53: compile-time error - f(void) {}; //# 54: compile-time error + void f{} /// 52: compile-time error + G g; /// 53: compile-time error + f(void) {}; /// 54: compile-time error optionalArg([x]) {} optionalArg( - void (var i) {} //# 55: compile-time error + void (var i) {} /// 55: compile-time error ); - function __PROTO__$(...args) { return 12; } //# 56: compile-time error - G<> t; //# 57: compile-time error - G t; //# 58: compile-time error - A a = null; //# 59: compile-time error - void v; //# 60: compile-time error - void v = null; //# 61: compile-time error - print(null is void); //# 62: compile-time error + function __PROTO__$(...args) { return 12; } /// 56: compile-time error + G<> t; /// 57: compile-time error + G t; /// 58: compile-time error + A a = null; /// 59: compile-time error + void v; /// 60: compile-time error + void v = null; /// 61: compile-time error + print(null is void); /// 62: compile-time error new A(); new B(); new Bad(); - 1 + 2 = 1; //# 63: compile-time error - new SyntaxTest() = 1; //# 64: compile-time error - futureOf(null) = 1; //# 65: compile-time error + 1 + 2 = 1; /// 63: compile-time error + new SyntaxTest() = 1; /// 64: compile-time error + futureOf(null) = 1; /// 65: compile-time error } catch (ex) { // Swallowing exceptions. Any error should be a compile-time error @@ -245,5 +245,5 @@ main() { } class Bad { - factory Bad 1; B.forward() - : this?.namedConstructor() //# 01: compile-time error + : this?.namedConstructor() /// 01: compile-time error ; test() { diff --git a/tests/language_strong/this_test.dart b/tests/language_strong/this_test.dart index d66500b996d..df5a599be5f 100644 --- a/tests/language_strong/this_test.dart +++ b/tests/language_strong/this_test.dart @@ -7,14 +7,14 @@ class Foo { f() {} testMe() { - x.this; //# 01: compile-time error - x.this(); //# 02: compile-time error - x.this.x; //# 03: compile-time error - x.this().x; //# 04: compile-time error - f().this; //# 05: compile-time error - f().this(); //# 06: compile-time error - f().this.f(); //# 07: compile-time error - f().this().f(); //# 08: compile-time error + x.this; /// 01: compile-time error + x.this(); /// 02: compile-time error + x.this.x; /// 03: compile-time error + x.this().x; /// 04: compile-time error + f().this; /// 05: compile-time error + f().this(); /// 06: compile-time error + f().this.f(); /// 07: compile-time error + f().this().f(); /// 08: compile-time error } } diff --git a/tests/language_strong/top_level_getter_no_setter1_test.dart b/tests/language_strong/top_level_getter_no_setter1_test.dart index 967fde66474..80b429e4b10 100644 --- a/tests/language_strong/top_level_getter_no_setter1_test.dart +++ b/tests/language_strong/top_level_getter_no_setter1_test.dart @@ -13,12 +13,12 @@ int get getter { class Class { method() { try { - getter++; //# 01: static type warning + getter++; /// 01: static type warning } on NoSuchMethodError catch(e) { - Expect.isTrue(getter_visited); //# 01: continued + Expect.isTrue(getter_visited); /// 01: continued return; } - Expect.fail('Expected NoSuchMethodError'); //# 01: continued + Expect.fail('Expected NoSuchMethodError'); /// 01: continued } } diff --git a/tests/language_strong/top_level_getter_no_setter2_test.dart b/tests/language_strong/top_level_getter_no_setter2_test.dart index 0bc1406a243..98c437e8a52 100644 --- a/tests/language_strong/top_level_getter_no_setter2_test.dart +++ b/tests/language_strong/top_level_getter_no_setter2_test.dart @@ -14,12 +14,12 @@ class Class { method() { try { - getter++; //# 01: static type warning + getter++; /// 01: static type warning } on NoSuchMethodError catch(e) { - Expect.isTrue(getter_visited); //# 01: continued + Expect.isTrue(getter_visited); /// 01: continued return; } - Expect.fail('Expected NoSuchMethodError'); //# 01: continued + Expect.fail('Expected NoSuchMethodError'); /// 01: continued } } diff --git a/tests/language_strong/toplevel_collision1_test.dart b/tests/language_strong/toplevel_collision1_test.dart index 1582c232e0c..9707ea91636 100644 --- a/tests/language_strong/toplevel_collision1_test.dart +++ b/tests/language_strong/toplevel_collision1_test.dart @@ -4,10 +4,10 @@ int x = 100; -get x => 200; // //# 00: compile-time error -set x(var i) { print(i); } // //# 01: compile-time error +get x => 200; // /// 00: compile-time error +set x(var i) { print(i); } // /// 01: compile-time error -int x(a, b) { print(a + b); } // //# 02: compile-time error +int x(a, b) { print(a + b); } // /// 02: compile-time error void main() { diff --git a/tests/language_strong/toplevel_collision2_test.dart b/tests/language_strong/toplevel_collision2_test.dart index f992f3e3202..49a39d12b2a 100644 --- a/tests/language_strong/toplevel_collision2_test.dart +++ b/tests/language_strong/toplevel_collision2_test.dart @@ -9,10 +9,10 @@ get x => 200; set x(var i) { print(i); } // Error: there is already a getter for x -int x; // //# 00: compile-time error +int x; // /// 00: compile-time error // Error: there is already a getter named x. -int x(a, b) { print(a + b); } // //# 01: compile-time error +int x(a, b) { print(a + b); } // /// 01: compile-time error diff --git a/tests/language_strong/try_catch4_test.dart b/tests/language_strong/try_catch4_test.dart index 7b595a136e3..c71b6d26bf7 100644 --- a/tests/language_strong/try_catch4_test.dart +++ b/tests/language_strong/try_catch4_test.dart @@ -13,11 +13,11 @@ foo1() { var b = false; var entered = false; while (true) { - if (entered) return b; //# static warning + if (entered) return b; /// static warning b = 8 == a; // This expression should not be GVN'ed. try { a = 8; - return; //# static warning + return; /// static warning } finally { b = 8 == a; entered = true; @@ -32,12 +32,12 @@ foo2() { var b = false; var entered = false; while (true) { - if (entered) return b; //# static warning + if (entered) return b; /// static warning b = 8 == a; // This expression should not be GVN'ed. try { a = 8; doThrow(); - return; //# static warning + return; /// static warning } catch(e) { b = 8 == a; entered = true; @@ -50,14 +50,14 @@ foo3() { var b = false; var entered = false; while (true) { - if (entered) return b; //# static warning + if (entered) return b; /// static warning b = 8 == a; // This expression should not be GVN'ed. try { doThrow(); } catch(e) { a = 8; entered = true; - return; //# static warning + return; /// static warning } finally { b = 8 == a; entered = true; diff --git a/tests/language_strong/try_catch5_test.dart b/tests/language_strong/try_catch5_test.dart index 49b25356b86..2b6d862b245 100644 --- a/tests/language_strong/try_catch5_test.dart +++ b/tests/language_strong/try_catch5_test.dart @@ -13,12 +13,12 @@ foo1() { var b = false; var entered = false; while (true) { - if (entered) return b; //# static warning + if (entered) return b; /// static warning b = 8 == a; // This expression should not be GVN'ed. try { try { a = 8; - return; //# static warning + return; /// static warning } finally { b = 8 == a; entered = true; diff --git a/tests/language_strong/try_catch_on_syntax_test.dart b/tests/language_strong/try_catch_on_syntax_test.dart index 33335dad006..5c4ad351a2a 100644 --- a/tests/language_strong/try_catch_on_syntax_test.dart +++ b/tests/language_strong/try_catch_on_syntax_test.dart @@ -15,11 +15,11 @@ void test1() { try { throw new MyException1(); } - on on MyException2 catch (e) { } //# 02: compile-time error - catch MyException2 catch (e) { } //# 03: compile-time error - catch catch catch (e) { } //# 04: compile-time error - on (e) { } //# 05: compile-time error - catch MyException2 catch (e) { } //# 06: compile-time error + on on MyException2 catch (e) { } /// 02: compile-time error + catch MyException2 catch (e) { } /// 03: compile-time error + catch catch catch (e) { } /// 04: compile-time error + on (e) { } /// 05: compile-time error + catch MyException2 catch (e) { } /// 06: compile-time error on MyException2 catch (e) { foo = 1; } on MyException1 catch (e) { @@ -27,7 +27,7 @@ void test1() { } on MyException catch (e) { foo = 3; } - on UndefinedClass //# 07: static type warning + on UndefinedClass /// 07: static type warning catch(e) { foo = 4; } Expect.equals(2, foo); } @@ -37,8 +37,8 @@ testFinal() { throw "catch this!"; } catch (e, s) { // Test that the error and stack trace variables are final. - e = null; // //# 10: runtime error - s = null; // //# 11: runtime error + e = null; // /// 10: runtime error + s = null; // /// 11: runtime error } } diff --git a/tests/language_strong/try_catch_syntax_test.dart b/tests/language_strong/try_catch_syntax_test.dart index 3aa93eb2f59..518d3dca17a 100644 --- a/tests/language_strong/try_catch_syntax_test.dart +++ b/tests/language_strong/try_catch_syntax_test.dart @@ -12,36 +12,36 @@ main() { } testMissingCatch() { - try { } // //# 01: compile-time error + try { } // /// 01: compile-time error } testMissingTry() { - on Exception catch (e) { } // //# 02: compile-time error - on Exception catch (e, trace) { } // //# 03: compile-time error - finally { } // //# 04: compile-time error + on Exception catch (e) { } // /// 02: compile-time error + on Exception catch (e, trace) { } // /// 03: compile-time error + finally { } // /// 04: compile-time error } testDuplicateCatchVariable() { - try { } on Exception catch (e, e) { } //# 05: compile-time error + try { } on Exception catch (e, e) { } /// 05: compile-time error } testIllegalFinally() { - try { } finally (e) { } //# 06: compile-time error + try { } finally (e) { } /// 06: compile-time error } testIllegalCatch() { - try { } catch () { } // //# 07: compile-time error - try { } on MammaMia catch (e) { } //# 08: static type warning - try { } catch (var e) { } // //# 09: compile-time error - try { } catch (final e) { } // //# 10: compile-time error - try { } catch (int e) { } // //# 11: compile-time error - try { } catch (final int e) { } // //# 12: compile-time error - try { } catch ([e, s]) { } // //# 13: compile-time error - try { } catch (e, [s]) { } // //# 14: compile-time error - try { } catch (e, [s0, s1]) { } // //# 15: compile-time error + try { } catch () { } // /// 07: compile-time error + try { } on MammaMia catch (e) { } /// 08: static type warning + try { } catch (var e) { } // /// 09: compile-time error + try { } catch (final e) { } // /// 10: compile-time error + try { } catch (int e) { } // /// 11: compile-time error + try { } catch (final int e) { } // /// 12: compile-time error + try { } catch ([e, s]) { } // /// 13: compile-time error + try { } catch (e, [s]) { } // /// 14: compile-time error + try { } catch (e, [s0, s1]) { } // /// 15: compile-time error } testIllegalRethrow() { - try { rethrow; } catch (e) { } // //# 16: compile-time error - try { } catch (e) { } finally { rethrow; } //# 17: compile-time error + try { rethrow; } catch (e) { } // /// 16: compile-time error + try { } catch (e) { } finally { rethrow; } /// 17: compile-time error } diff --git a/tests/language_strong/try_catch_test.dart b/tests/language_strong/try_catch_test.dart index f7d7e97938f..4a41dd1efd4 100644 --- a/tests/language_strong/try_catch_test.dart +++ b/tests/language_strong/try_catch_test.dart @@ -168,7 +168,7 @@ class TryCatchTest { } on String catch (e) { // Compile-time constants in unreachable catch blocks are still // compiled. - const y = x[0]; // //# 01: compile-time error + const y = x[0]; // /// 01: compile-time error Expect.fail("unreachable"); } } diff --git a/tests/language_strong/type_check_const_function_typedef2_test.dart b/tests/language_strong/type_check_const_function_typedef2_test.dart index bf98572da04..42a3d8c5c12 100644 --- a/tests/language_strong/type_check_const_function_typedef2_test.dart +++ b/tests/language_strong/type_check_const_function_typedef2_test.dart @@ -13,9 +13,9 @@ class A { const A(this.f); } -int // //# 00: static type warning, checked mode compile-time error +int // /// 00: static type warning, checked mode compile-time error foo( -String // //# 00: continued +String // /// 00: continued x) => 499; const a = const A(foo); diff --git a/tests/language_strong/type_literal_prefix_call_test.dart b/tests/language_strong/type_literal_prefix_call_test.dart index b80cb44be63..8dfdfb3b3ac 100644 --- a/tests/language_strong/type_literal_prefix_call_test.dart +++ b/tests/language_strong/type_literal_prefix_call_test.dart @@ -8,5 +8,5 @@ import 'dart:core' as core; // Check that calling a type with a prefix is allowed, but throws at runtime. main() { - Expect.throws(() => core.List(), (e) => e is core.NoSuchMethodError); //# 00: static type warning + Expect.throws(() => core.List(), (e) => e is core.NoSuchMethodError); /// 00: static type warning } diff --git a/tests/language_strong/type_parameter_test.dart b/tests/language_strong/type_parameter_test.dart index 1b91d0a8e44..eb39d1bdf19 100644 --- a/tests/language_strong/type_parameter_test.dart +++ b/tests/language_strong/type_parameter_test.dart @@ -17,28 +17,28 @@ class A { } static - T //# 01: static type warning, dynamic type error + T /// 01: static type warning, dynamic type error staticMethod( - T //# 02: static type warning, dynamic type error + T /// 02: static type warning, dynamic type error a) { final - T //# 03: static type warning, dynamic type error + T /// 03: static type warning, dynamic type error a = "not_null"; print(a); return a; } static final - T //# 04: static type warning, dynamic type error + T /// 04: static type warning, dynamic type error staticFinalField = "not_null"; static const - T //# 05: static type warning, checked mode compile-time error + T /// 05: static type warning, checked mode compile-time error staticConstField = "not_null"; static not_null() => "not_null"; static final - T //# 06: static type warning, dynamic type error + T /// 06: static type warning, dynamic type error staticFinalField2 = not_null(); // Assigning null to a malformed type is not a dynamic error. diff --git a/tests/language_strong/type_promotion_assign_test.dart b/tests/language_strong/type_promotion_assign_test.dart index d928fd2449c..51f0ee5d4b7 100644 --- a/tests/language_strong/type_promotion_assign_test.dart +++ b/tests/language_strong/type_promotion_assign_test.dart @@ -27,21 +27,21 @@ void main() { A a = new E(); if (a is B) { print(a.a); - print(a.b); //# 01: static type warning + print(a.b); /// 01: static type warning a = null; } if (a is B) { a = null; print(a.a); - print(a.b); //# 02: static type warning + print(a.b); /// 02: static type warning } if (a is B) { print(a.a); - print(a.b); //# 03: static type warning + print(a.b); /// 03: static type warning { a = null; } print(a.a); - print(a.b); //# 04: static type warning + print(a.b); /// 04: static type warning } } diff --git a/tests/language_strong/type_promotion_closure_test.dart b/tests/language_strong/type_promotion_closure_test.dart index 2a1660d549b..5b0b2c0224a 100644 --- a/tests/language_strong/type_promotion_closure_test.dart +++ b/tests/language_strong/type_promotion_closure_test.dart @@ -49,7 +49,7 @@ void test1() { A a = new E(); if (a is B) { print(a.a); - print(a.b); //# 01: static type warning + print(a.b); /// 01: static type warning } void foo() { a = new D(); @@ -63,7 +63,7 @@ void test2() { } if (a is B) { print(a.a); - print(a.b); //# 02: static type warning + print(a.b); /// 02: static type warning } } @@ -74,12 +74,12 @@ void test3() { } if (a is B) { print(a.a); - print(a.b); //# 03: static type warning + print(a.b); /// 03: static type warning void foo() { a = new D(); } print(a.a); - print(a.b); //# 04: static type warning + print(a.b); /// 04: static type warning } } @@ -90,19 +90,19 @@ void test3a() { } if ((((a)) is B)) { print(a.a); - print(a.b); //# 15: static type warning + print(a.b); /// 15: static type warning void foo() { a = new D(); } print(a.a); - print(a.b); //# 16: static type warning + print(a.b); /// 16: static type warning } } void test4() { A a = new E(); if (a is B) { - func(() => a.b); //# 05: ok + func(() => a.b); /// 05: ok print(a.a); print(a.b); } @@ -111,7 +111,7 @@ void test4() { void test5() { A a = new E(); if (a is B) { - func(() => a.b); //# 06: static type warning + func(() => a.b); /// 06: static type warning print(a.a); } a = null; @@ -122,7 +122,7 @@ void test6() { if (a is B) { func(() => a); print(a.a); - print(a.b); //# 07: static type warning + print(a.b); /// 07: static type warning } a = null; } @@ -132,7 +132,7 @@ void test6a() { if (((a) is B)) { func(() => a); print(a.a); - print(a.b); //# 14: static type warning + print(a.b); /// 14: static type warning } a = null; } @@ -141,7 +141,7 @@ void test7() { A a = new E(); if (a is B && func(() => a)) { print(a.a); - print(a.b); //# 08: ok + print(a.b); /// 08: ok } a = null; } @@ -149,7 +149,7 @@ void test7() { void test8() { A a = new E(); if (a is B - && func(() => a.b) //# 09: static type warning + && func(() => a.b) /// 09: static type warning ) { print(a.a); } @@ -158,7 +158,7 @@ void test8() { void test9() { A a = new E(); - var b = a is B ? func(() => a.b) : false; //# 10: static type warning + var b = a is B ? func(() => a.b) : false; /// 10: static type warning a = null; } @@ -166,7 +166,7 @@ void test10() { List a = [new E()]; if (a is List) { func(() => a[0]); - print(a[0].b); //# 11: static type warning + print(a[0].b); /// 11: static type warning } a = null; } @@ -175,7 +175,7 @@ void test11() { List a = [new E()]; if (a is List) { func(() => a[0] = null); - print(a[0].b); //# 12: static type warning + print(a[0].b); /// 12: static type warning } a = null; } @@ -185,7 +185,7 @@ void test12() { if (a is B) { func(() => a++); print(a.a); - print(a.b); //# 13: static type warning + print(a.b); /// 13: static type warning } a = null; } diff --git a/tests/language_strong/type_promotion_functions_test.dart b/tests/language_strong/type_promotion_functions_test.dart index c9caf0359aa..bcf12b3c438 100644 --- a/tests/language_strong/type_promotion_functions_test.dart +++ b/tests/language_strong/type_promotion_functions_test.dart @@ -35,13 +35,13 @@ testFuncAtoDyn() { FuncAtoDyn funcAtoDyn = func; a = funcAtoDyn(new A()); b = funcAtoDyn(new B()); - c = funcAtoDyn(new C()); //# 01: static type warning + c = funcAtoDyn(new C()); /// 01: static type warning if (funcAtoDyn is FuncDynToDyn) { // No promotion: FuncDynToDyn !<< FuncAtoDyn. a = funcAtoDyn(new A()); b = funcAtoDyn(new B()); - c = funcAtoDyn(new C()); //# 11: static type warning + c = funcAtoDyn(new C()); /// 11: static type warning } } @@ -54,28 +54,28 @@ testFuncDynToDyn() { if (funcDynToDyn is FuncAtoDyn) { // Promotion: FuncAtoDyn << FuncDynToDyn. a = funcDynToDyn(new A()); b = funcDynToDyn(new B()); - c = funcDynToDyn(new C()); //# 09: static type warning + c = funcDynToDyn(new C()); /// 09: static type warning } if (funcDynToDyn is FuncDynToVoid) { // Promotion: FuncDynToVoid << FuncDynToDyn. - a = funcDynToDyn(new A()); //# 12: static type warning - b = funcDynToDyn(new B()); //# 13: static type warning - c = funcDynToDyn(new C()); //# 14: static type warning + a = funcDynToDyn(new A()); /// 12: static type warning + b = funcDynToDyn(new B()); /// 13: static type warning + c = funcDynToDyn(new C()); /// 14: static type warning } if (funcDynToDyn is FuncDynToA) { // Promotion: FuncDynToA << FuncDynToDyn. a = funcDynToDyn(new A()); b = funcDynToDyn(new B()); - c = funcDynToDyn(new C()); //# 10: static type warning + c = funcDynToDyn(new C()); /// 10: static type warning } } testFuncDynToVoid() { FuncDynToVoid funcDynToVoid = func; - a = funcDynToVoid(new A()); //# 02: static type warning - b = funcDynToVoid(new B()); //# 03: static type warning - c = funcDynToVoid(new C()); //# 04: static type warning + a = funcDynToVoid(new A()); /// 02: static type warning + b = funcDynToVoid(new B()); /// 03: static type warning + c = funcDynToVoid(new C()); /// 04: static type warning if (funcDynToVoid is FuncDynToDyn) { // Promotion: FuncDynToDyn << FuncDynToVoid. @@ -87,7 +87,7 @@ testFuncDynToVoid() { if (funcDynToVoid is FuncDynToA) { // Promotion: FuncDynToA << FuncDynToVoid. a = funcDynToVoid(new A()); b = funcDynToVoid(new B()); - c = funcDynToVoid(new C()); //# 05: static type warning + c = funcDynToVoid(new C()); /// 05: static type warning } } @@ -95,19 +95,19 @@ testFuncDynToA() { FuncDynToA funcDynToA = func; a = funcDynToA(new A()); b = funcDynToA(new B()); - c = funcDynToA(new C()); //# 06: static type warning + c = funcDynToA(new C()); /// 06: static type warning if (funcDynToA is FuncDynToDyn) { // No promotion: FuncDynToDyn !<< FuncDynToA. a = funcDynToA(new A()); b = funcDynToA(new B()); - c = funcDynToA(new C()); //# 08: static type warning + c = funcDynToA(new C()); /// 08: static type warning } if (funcDynToA is FuncDynToVoid) { // No promotion: FuncDynToVoid !<< FuncDynToA. a = funcDynToA(new A()); b = funcDynToA(new B()); - c = funcDynToA(new C()); //# 07: static type warning + c = funcDynToA(new C()); /// 07: static type warning } } \ No newline at end of file diff --git a/tests/language_strong/type_promotion_local_test.dart b/tests/language_strong/type_promotion_local_test.dart index 8c3a4c817bd..d16e93f9aac 100644 --- a/tests/language_strong/type_promotion_local_test.dart +++ b/tests/language_strong/type_promotion_local_test.dart @@ -26,134 +26,134 @@ class E implements C, D { void main() { A a = new E(); print(a.a); - print(a.b); //# 01: static type warning - print(a.c); //# 02: static type warning - print(a.d); //# 03: static type warning + print(a.b); /// 01: static type warning + print(a.c); /// 02: static type warning + print(a.d); /// 03: static type warning if (a is B) { print(a.a); print(a.b); - print(a.c); //# 04: static type warning - print(a.d); //# 05: static type warning + print(a.c); /// 04: static type warning + print(a.d); /// 05: static type warning if (a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 06: static type warning + print(a.d); /// 06: static type warning } print(a.a); print(a.b); - print(a.c); //# 07: static type warning - print(a.d); //# 08: static type warning + print(a.c); /// 07: static type warning + print(a.d); /// 08: static type warning } if (a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 09: static type warning + print(a.d); /// 09: static type warning if (a is B) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 10: static type warning + print(a.d); /// 10: static type warning } if (a is D) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 11: static type warning + print(a.d); /// 11: static type warning } print(a.a); print(a.b); print(a.c); - print(a.d); //# 12: static type warning + print(a.d); /// 12: static type warning } print(a.a); - print(a.b); //# 13: static type warning - print(a.c); //# 14: static type warning - print(a.d); //# 15: static type warning + print(a.b); /// 13: static type warning + print(a.c); /// 14: static type warning + print(a.d); /// 15: static type warning if (a is D) { print(a.a); - print(a.b); //# 16: static type warning - print(a.c); //# 17: static type warning + print(a.b); /// 16: static type warning + print(a.c); /// 17: static type warning print(a.d); } print(a.a); - print(a.b); //# 18: static type warning - print(a.c); //# 19: static type warning - print(a.d); //# 20: static type warning + print(a.b); /// 18: static type warning + print(a.c); /// 19: static type warning + print(a.d); /// 20: static type warning var o1 = a is B ? '${a.a}' '${a.b}' - '${a.c}' //# 21: static type warning - '${a.d}' //# 22: static type warning + '${a.c}' /// 21: static type warning + '${a.d}' /// 22: static type warning : '${a.a}' - '${a.b}' //# 23: static type warning - '${a.c}' //# 24: static type warning - '${a.d}' //# 25: static type warning + '${a.b}' /// 23: static type warning + '${a.c}' /// 24: static type warning + '${a.d}' /// 25: static type warning ; var o2 = a is C ? '${a.a}' '${a.b}' '${a.c}' - '${a.d}' //# 26: static type warning + '${a.d}' /// 26: static type warning : '${a.a}' - '${a.b}' //# 27: static type warning - '${a.c}' //# 28: static type warning - '${a.d}' //# 29: static type warning + '${a.b}' /// 27: static type warning + '${a.c}' /// 28: static type warning + '${a.d}' /// 29: static type warning ; var o3 = a is D ? '${a.a}' - '${a.b}' //# 30: static type warning - '${a.c}' //# 31: static type warning + '${a.b}' /// 30: static type warning + '${a.c}' /// 31: static type warning '${a.d}' : '${a.a}' - '${a.b}' //# 32: static type warning - '${a.c}' //# 33: static type warning - '${a.d}' //# 34: static type warning + '${a.b}' /// 32: static type warning + '${a.c}' /// 33: static type warning + '${a.d}' /// 34: static type warning ; if (a is B && a is B) { print(a.a); print(a.b); - print(a.c); //# 35: static type warning - print(a.d); //# 36: static type warning + print(a.c); /// 35: static type warning + print(a.d); /// 36: static type warning } if (a is B && a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 37: static type warning + print(a.d); /// 37: static type warning } if (a is C && a is B) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 38: static type warning + print(a.d); /// 38: static type warning } if (a is C && a is D) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 39: static type warning + print(a.d); /// 39: static type warning } if (a is D && a is C) { print(a.a); - print(a.b); //# 40: static type warning - print(a.c); //# 41: static type warning + print(a.b); /// 40: static type warning + print(a.c); /// 41: static type warning print(a.d); } } diff --git a/tests/language_strong/type_promotion_logical_and_test.dart b/tests/language_strong/type_promotion_logical_and_test.dart index eaf29150218..1ee62960607 100644 --- a/tests/language_strong/type_promotion_logical_and_test.dart +++ b/tests/language_strong/type_promotion_logical_and_test.dart @@ -27,14 +27,14 @@ void main() { A a = new E(); var b; if (a is D && ((a = new D()) != null)) { - b = a.d; //# 01: static type warning + b = a.d; /// 01: static type warning } if (a is D && (b = a.d)) { - b = a.d; //# 02: static type warning + b = a.d; /// 02: static type warning a = null; } if ((((a) is D) && (b = (a).d))) { - b = a.d; //# 03: static type warning + b = a.d; /// 03: static type warning a = null; } if (f(a = null) && a is D) { diff --git a/tests/language_strong/type_promotion_more_specific_test.dart b/tests/language_strong/type_promotion_more_specific_test.dart index 2d47f6b3eed..eb843b6f3a5 100644 --- a/tests/language_strong/type_promotion_more_specific_test.dart +++ b/tests/language_strong/type_promotion_more_specific_test.dart @@ -39,17 +39,17 @@ void testInterface() { A a = new B(); if (a is B) { // Promotion B << A. - x = a.b; //# 01: ok + x = a.b; /// 01: ok } if (a is C) { // No promotion C !<< A. - x = a.c; //# 02: static type warning + x = a.c; /// 02: static type warning } B b = new B(); if (b is A) { // No promotion B !<< A. - x = b.b; //# 03: ok + x = b.b; /// 03: ok } if (x is A) { // No promotion A !<< dynamic. - y = x.b; //# 04: ok + y = x.b; /// 04: ok } } @@ -59,24 +59,24 @@ testGeneric() { D d1 = new E(null); if (d1 is E) { // Promotion: E << D. - x = d1.e; //# 05: ok + x = d1.e; /// 05: ok } if (d1 is E) { // Promotion: E << D. - int a = d1.d; //# 06: static type warning - String b = d1.d; //# 07: static type warning - x = d1.e; //# 08: ok + int a = d1.d; /// 06: static type warning + String b = d1.d; /// 07: static type warning + x = d1.e; /// 08: ok } D d2 = new E(null); if (d2 is E) { // No promotion: E !<< D - x = d2.e; //# 09: static type warning - int a = d2.e; //# 10: static type warning - String b = d2.e; //# 11: static type warning + x = d2.e; /// 09: static type warning + int a = d2.e; /// 10: static type warning + String b = d2.e; /// 11: static type warning } D d3 = new E(new B()); if (d3 is E) { // Promotion: E << D - x = d3.d.b; //# 12: ok - x = d3.e.b; //# 13: ok + x = d3.d.b; /// 12: ok + x = d3.e.b; /// 13: ok } } diff --git a/tests/language_strong/type_promotion_multiple_test.dart b/tests/language_strong/type_promotion_multiple_test.dart index d376f467cef..f692916c722 100644 --- a/tests/language_strong/type_promotion_multiple_test.dart +++ b/tests/language_strong/type_promotion_multiple_test.dart @@ -29,68 +29,68 @@ void main() { void test(A a1) { A a2 = new E(); print(a1.a); - print(a1.b); //# 01: static type warning - print(a1.c); //# 02: static type warning - print(a1.d); //# 03: static type warning + print(a1.b); /// 01: static type warning + print(a1.c); /// 02: static type warning + print(a1.d); /// 03: static type warning print(a2.a); - print(a2.b); //# 04: static type warning - print(a2.c); //# 05: static type warning - print(a2.d); //# 06: static type warning + print(a2.b); /// 04: static type warning + print(a2.c); /// 05: static type warning + print(a2.d); /// 06: static type warning if (a1 is B && a2 is C) { print(a1.a); print(a1.b); - print(a1.c); //# 07: static type warning - print(a1.d); //# 08: static type warning + print(a1.c); /// 07: static type warning + print(a1.d); /// 08: static type warning print(a2.a); print(a2.b); print(a2.c); - print(a2.d); //# 09: static type warning + print(a2.d); /// 09: static type warning if (a1 is C && a2 is D) { print(a1.a); print(a1.b); print(a1.c); - print(a1.d); //# 10: static type warning + print(a1.d); /// 10: static type warning print(a2.a); print(a2.b); print(a2.c); - print(a2.d); //# 11: static type warning + print(a2.d); /// 11: static type warning } } var o1 = a1 is B && a2 is C ? '${a1.a}' '${a1.b}' - '${a1.c}' //# 12: static type warning - '${a1.d}' //# 13: static type warning + '${a1.c}' /// 12: static type warning + '${a1.d}' /// 13: static type warning '${a2.a}' '${a2.b}' '${a2.c}' - '${a2.d}' //# 14: static type warning + '${a2.d}' /// 14: static type warning : '${a1.a}' - '${a1.b}' //# 15: static type warning - '${a1.c}' //# 16: static type warning - '${a1.d}' //# 17: static type warning + '${a1.b}' /// 15: static type warning + '${a1.c}' /// 16: static type warning + '${a1.d}' /// 17: static type warning '${a2.a}' - '${a2.b}' //# 18: static type warning - '${a2.c}' //# 19: static type warning - '${a2.d}' //# 20: static type warning + '${a2.b}' /// 18: static type warning + '${a2.c}' /// 19: static type warning + '${a2.d}' /// 20: static type warning ; if (a2 is C && a1 is B && a1 is C && a2 is B && a2 is D) { print(a1.a); print(a1.b); print(a1.c); - print(a1.d); //# 21: static type warning + print(a1.d); /// 21: static type warning print(a2.a); print(a2.b); print(a2.c); - print(a2.d); //# 22: static type warning + print(a2.d); /// 22: static type warning } } diff --git a/tests/language_strong/type_promotion_parameter_test.dart b/tests/language_strong/type_promotion_parameter_test.dart index 8672dc875f5..fd07e2cbd0f 100644 --- a/tests/language_strong/type_promotion_parameter_test.dart +++ b/tests/language_strong/type_promotion_parameter_test.dart @@ -28,176 +28,176 @@ void main() { } void test(A a) { print(a.a); - print(a.b); //# 01: static type warning - print(a.c); //# 02: static type warning - print(a.d); //# 03: static type warning + print(a.b); /// 01: static type warning + print(a.c); /// 02: static type warning + print(a.d); /// 03: static type warning if (a is B) { print(a.a); print(a.b); - print(a.c); //# 04: static type warning - print(a.d); //# 05: static type warning + print(a.c); /// 04: static type warning + print(a.d); /// 05: static type warning if (a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 06: static type warning + print(a.d); /// 06: static type warning } print(a.a); print(a.b); - print(a.c); //# 07: static type warning - print(a.d); //# 08: static type warning + print(a.c); /// 07: static type warning + print(a.d); /// 08: static type warning } if (a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 09: static type warning + print(a.d); /// 09: static type warning if (a is B) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 10: static type warning + print(a.d); /// 10: static type warning } if (a is D) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 11: static type warning + print(a.d); /// 11: static type warning } print(a.a); print(a.b); print(a.c); - print(a.d); //# 12: static type warning + print(a.d); /// 12: static type warning } print(a.a); - print(a.b); //# 13: static type warning - print(a.c); //# 14: static type warning - print(a.d); //# 15: static type warning + print(a.b); /// 13: static type warning + print(a.c); /// 14: static type warning + print(a.d); /// 15: static type warning if (a is D) { print(a.a); - print(a.b); //# 16: static type warning - print(a.c); //# 17: static type warning + print(a.b); /// 16: static type warning + print(a.c); /// 17: static type warning print(a.d); } print(a.a); - print(a.b); //# 18: static type warning - print(a.c); //# 19: static type warning - print(a.d); //# 20: static type warning + print(a.b); /// 18: static type warning + print(a.c); /// 19: static type warning + print(a.d); /// 20: static type warning var o1 = a is B ? '${a.a}' '${a.b}' - '${a.c}' //# 21: static type warning - '${a.d}' //# 22: static type warning + '${a.c}' /// 21: static type warning + '${a.d}' /// 22: static type warning : '${a.a}' - '${a.b}' //# 23: static type warning - '${a.c}' //# 24: static type warning - '${a.d}' //# 25: static type warning + '${a.b}' /// 23: static type warning + '${a.c}' /// 24: static type warning + '${a.d}' /// 25: static type warning ; var o2 = a is C ? '${a.a}' '${a.b}' '${a.c}' - '${a.d}' //# 26: static type warning + '${a.d}' /// 26: static type warning : '${a.a}' - '${a.b}' //# 27: static type warning - '${a.c}' //# 28: static type warning - '${a.d}' //# 29: static type warning + '${a.b}' /// 27: static type warning + '${a.c}' /// 28: static type warning + '${a.d}' /// 29: static type warning ; var o3 = a is D ? '${a.a}' - '${a.b}' //# 30: static type warning - '${a.c}' //# 31: static type warning + '${a.b}' /// 30: static type warning + '${a.c}' /// 31: static type warning '${a.d}' : '${a.a}' - '${a.b}' //# 32: static type warning - '${a.c}' //# 33: static type warning - '${a.d}' //# 34: static type warning + '${a.b}' /// 32: static type warning + '${a.c}' /// 33: static type warning + '${a.d}' /// 34: static type warning ; if (a is B && a is B) { print(a.a); print(a.b); - print(a.c); //# 35: static type warning - print(a.d); //# 36: static type warning + print(a.c); /// 35: static type warning + print(a.d); /// 36: static type warning } if (a is B && a is C) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 37: static type warning + print(a.d); /// 37: static type warning } if (a is C && a is B) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 38: static type warning + print(a.d); /// 38: static type warning } if (a is C && a is D) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 39: static type warning + print(a.d); /// 39: static type warning } if (a is D && a is C) { print(a.a); - print(a.b); //# 40: static type warning - print(a.c); //# 41: static type warning + print(a.b); /// 40: static type warning + print(a.c); /// 41: static type warning print(a.d); } if (a is D && a.a == "" - && a.b == "" // //# 42: static type warning - && a.c == "" // //# 43: static type warning + && a.b == "" // /// 42: static type warning + && a.c == "" // /// 43: static type warning && a.d == "") { print(a.a); - print(a.b); //# 44: static type warning - print(a.c); //# 45: static type warning + print(a.b); /// 44: static type warning + print(a.c); /// 45: static type warning print(a.d); } if (a.a == "" - && a.b == "" //# 46: static type warning - && a.c == "" //# 47: static type warning - && a.d == "" //# 48: static type warning + && a.b == "" /// 46: static type warning + && a.c == "" /// 47: static type warning + && a.d == "" /// 48: static type warning && a is B && a.a == "" && a.b == "" - && a.c == "" //# 49: static type warning - && a.d == "" //# 50: static type warning + && a.c == "" /// 49: static type warning + && a.d == "" /// 50: static type warning && a is C && a.a == "" && a.b == "" && a.c == "" - && a.d == "" //# 51: static type warning + && a.d == "" /// 51: static type warning ) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 52: static type warning + print(a.d); /// 52: static type warning } if ((a is B)) { print(a.a); print(a.b); - print(a.c); //# 54: static type warning - print(a.d); //# 55: static type warning + print(a.c); /// 54: static type warning + print(a.d); /// 55: static type warning } if ((a is B && (a) is C) && a is B) { print(a.a); print(a.b); print(a.c); - print(a.d); //# 56: static type warning + print(a.d); /// 56: static type warning } } diff --git a/tests/language_strong/type_variable_bounds2_test.dart b/tests/language_strong/type_variable_bounds2_test.dart index 5d452fb59f9..9fd3894b20f 100644 --- a/tests/language_strong/type_variable_bounds2_test.dart +++ b/tests/language_strong/type_variable_bounds2_test.dart @@ -11,13 +11,13 @@ abstract class J { } abstract class K { } abstract class I { } class A implements I, J { @@ -27,21 +27,21 @@ main() { var a = new A(); { - I i = a; // //# 00: dynamic type error, static type warning - J j = a; // //# 01: static type warning - K k = a; // //# 02: dynamic type error, static type warning + I i = a; // /// 00: dynamic type error, static type warning + J j = a; // /// 01: static type warning + K k = a; // /// 02: dynamic type error, static type warning // In production mode, A is subtype of I, error in checked mode. - var x = a is I; // //# 03: dynamic type error, static type warning + var x = a is I; // /// 03: dynamic type error, static type warning // In both production and checked modes, A is a subtype of J. - Expect.isTrue(a is J); // //# 04: static type warning + Expect.isTrue(a is J); // /// 04: static type warning // In both production and checked modes, A is not a subtype of K. // However, while unsuccessfully trying to prove that A is a K, // a malformed type is encountered in checked mode, resulting in a dynamic // type error. - Expect.isTrue(a is !K); // //# 05: dynamic type error, static type warning + Expect.isTrue(a is !K); // /// 05: dynamic type error, static type warning } a = new A(); @@ -49,7 +49,7 @@ main() { { I i = a; J j = a; - K k = a; // //# 06: dynamic type error, static type warning + K k = a; // /// 06: dynamic type error, static type warning // In both production and checked modes, A is a subtype of I. Expect.isTrue(a is I); diff --git a/tests/language_strong/type_variable_bounds3_test.dart b/tests/language_strong/type_variable_bounds3_test.dart index aeef48151cb..405c4a74030 100644 --- a/tests/language_strong/type_variable_bounds3_test.dart +++ b/tests/language_strong/type_variable_bounds3_test.dart @@ -9,7 +9,7 @@ class A { class B { foo(x) { - return x is A; // //# 00: dynamic type error, static type warning + return x is A; // /// 00: dynamic type error, static type warning } } diff --git a/tests/language_strong/type_variable_bounds4_test.dart b/tests/language_strong/type_variable_bounds4_test.dart index 1275310dec3..3581d6f5780 100644 --- a/tests/language_strong/type_variable_bounds4_test.dart +++ b/tests/language_strong/type_variable_bounds4_test.dart @@ -5,22 +5,22 @@ // Test instantiation of object with malbounded types. class A {} class B implements A {} class C implements B {} class Class { newA() { - new A(); //# 01: continued + new A(); /// 01: continued } newB() { - new B(); //# 01: continued + new B(); /// 01: continued } newC() { - new C(); //# 01: continued + new C(); /// 01: continued } } @@ -53,9 +53,9 @@ void main() { test(false, () => new B()); test(false, () => new C()); - test(true, () => new A()); //# 01: continued - test(true, () => new B()); //# 01: continued - test(true, () => new C()); //# 01: continued + test(true, () => new A()); /// 01: continued + test(true, () => new B()); /// 01: continued + test(true, () => new C()); /// 01: continued var c = new Class(); test(false, () => c.newA()); @@ -63,7 +63,7 @@ void main() { test(false, () => c.newC()); c = new Class(); - test(true, () => c.newA()); //# 01: continued - test(true, () => c.newB()); //# 01: continued - test(true, () => c.newC()); //# 01: continued + test(true, () => c.newA()); /// 01: continued + test(true, () => c.newB()); /// 01: continued + test(true, () => c.newC()); /// 01: continued } \ No newline at end of file diff --git a/tests/language_strong/type_variable_bounds_test.dart b/tests/language_strong/type_variable_bounds_test.dart index 7696d489aab..5cc03a97e36 100644 --- a/tests/language_strong/type_variable_bounds_test.dart +++ b/tests/language_strong/type_variable_bounds_test.dart @@ -7,7 +7,7 @@ class Foo { Foo(); - factory Foo.bad() = XFoo; // //# 00: static type warning + factory Foo.bad() = XFoo; // /// 00: static type warning factory Foo.good() = Foo; @@ -20,7 +20,7 @@ abstract class IFoo { // String is not assignable to num. class Baz - extends Foo //# 01: static type warning, dynamic type error + extends Foo /// 01: static type warning, dynamic type error {} class Biz extends Foo {} @@ -29,26 +29,26 @@ Foo fi; // String is not assignable to num. Foo - //# 02: static type warning, dynamic type error + /// 02: static type warning, dynamic type error fs; class Box { // Box.T is not assignable to num. - Foo t; //# 03: static type warning + Foo t; /// 03: static type warning makeFoo() { // Box.T is not assignable to num. - return new Foo(); //# 04: static type warning, dynamic type error + return new Foo(); /// 04: static type warning, dynamic type error } } main() { // String is not assignable to num. - var v1 = new Foo(); //# 05: static type warning, dynamic type error + var v1 = new Foo(); /// 05: static type warning, dynamic type error // String is not assignable to num. - Foo v2 = null; //# 06: static type warning + Foo v2 = null; /// 06: static type warning new Baz(); new Biz(); @@ -61,14 +61,14 @@ main() { new Box().makeFoo(); // Fisk does not exist. - new Box(); //# 07: static type warning + new Box(); /// 07: static type warning // Too many type arguments. - new Box(); //# 08: static type warning + new Box(); /// 08: static type warning // Fisk does not exist. - Box box = null; //# 09: static type warning + Box box = null; /// 09: static type warning // Too many type arguments. - Box box = null; //# 10: static type warning + Box box = null; /// 10: static type warning } diff --git a/tests/language_strong/type_variable_conflict2_test.dart b/tests/language_strong/type_variable_conflict2_test.dart index b9a64d883c6..a0af730a082 100644 --- a/tests/language_strong/type_variable_conflict2_test.dart +++ b/tests/language_strong/type_variable_conflict2_test.dart @@ -13,45 +13,45 @@ class C { } // Class 'C' has no instance method 'T': call noSuchMethod. - foo() => T(); // //# 01: static type warning + foo() => T(); // /// 01: static type warning // T is in scope, even in static context. Compile-time error to call this.T(). - static bar() => T(); // //# 02: compile-time error + static bar() => T(); // /// 02: compile-time error // X is not in scope. NoSuchMethodError. - static baz() => X(); // //# 03: static type warning + static baz() => X(); // /// 03: static type warning // Class 'C' has no static method 'T': NoSuchMethodError. - static qux() => C.T(); // //# 04: static type warning + static qux() => C.T(); // /// 04: static type warning // Class '_Type' has no instance method 'call': NoSuchMethodError. - quux() => (T)(); // //# 05: static type warning + quux() => (T)(); // /// 05: static type warning // Runtime type T not accessible from static context. Compile-time error. - static corge() => (T)(); // //# 06: compile-time error + static corge() => (T)(); // /// 06: compile-time error // Class '_Type' has no [] operator: NoSuchMethodError. - grault() => T[0]; // //# 07: static type warning + grault() => T[0]; // /// 07: static type warning // Runtime type T not accessible from static context. Compile-time error. - static garply() => T[0]; // //# 08: compile-time error + static garply() => T[0]; // /// 08: compile-time error // Class '_Type' has no member m: NoSuchMethodError. - waldo() => T.m; // //# 09: static type warning + waldo() => T.m; // /// 09: static type warning // Runtime type T not accessible from static context. Compile-time error. - static fred() => T.m; // //# 10: compile-time error + static fred() => T.m; // /// 10: compile-time error } main() { - Expect.equals(42, new C().foo()); // //# 01: continued - C.bar(); // //# 02: continued - Expect.throws(() => C.baz(), (e) => e is NoSuchMethodError); // //# 03: continued - Expect.throws(() => C.qux(), (e) => e is NoSuchMethodError); // //# 04: continued - Expect.throws(() => new C().quux(), (e) => e is NoSuchMethodError); // //# 05: continued - C.corge(); // //# 06: continued - Expect.throws(() => new C().grault(), (e) => e is NoSuchMethodError); // //# 07: continued - C.garply(); // //# 08: continued - Expect.throws(() => new C().waldo(), (e) => e is NoSuchMethodError); // //# 09: continued - C.fred(); // //# 10: continued + Expect.equals(42, new C().foo()); // /// 01: continued + C.bar(); // /// 02: continued + Expect.throws(() => C.baz(), (e) => e is NoSuchMethodError); // /// 03: continued + Expect.throws(() => C.qux(), (e) => e is NoSuchMethodError); // /// 04: continued + Expect.throws(() => new C().quux(), (e) => e is NoSuchMethodError); // /// 05: continued + C.corge(); // /// 06: continued + Expect.throws(() => new C().grault(), (e) => e is NoSuchMethodError); // /// 07: continued + C.garply(); // /// 08: continued + Expect.throws(() => new C().waldo(), (e) => e is NoSuchMethodError); // /// 09: continued + C.fred(); // /// 10: continued } diff --git a/tests/language_strong/type_variable_conflict_test.dart b/tests/language_strong/type_variable_conflict_test.dart index 8cb3cb14ee0..1453f4292e9 100644 --- a/tests/language_strong/type_variable_conflict_test.dart +++ b/tests/language_strong/type_variable_conflict_test.dart @@ -8,22 +8,22 @@ import "package:expect/expect.dart"; class G1 { - var T; // //# 01: compile-time error + var T; // /// 01: compile-time error } class G2 { - get T {} // //# 02: compile-time error + get T {} // /// 02: compile-time error } class G3 { - T() {} // //# 03: compile-time error + T() {} // /// 03: compile-time error } class G4 { - static var T; // //# 04: compile-time error + static var T; // /// 04: compile-time error } class G5 { - static get T {} // //# 05: compile-time error + static get T {} // /// 05: compile-time error } class G6 { - static T() {} // //# 06: compile-time error + static T() {} // /// 06: compile-time error } main() { diff --git a/tests/language_strong/type_variable_scope3_test.dart b/tests/language_strong/type_variable_scope3_test.dart index 99f04d48f8a..262131aa084 100644 --- a/tests/language_strong/type_variable_scope3_test.dart +++ b/tests/language_strong/type_variable_scope3_test.dart @@ -5,12 +5,12 @@ // Test that a type parameter cannot be repeated. class Foo { } main() { new Foo(); } diff --git a/tests/language_strong/type_variable_scope_test.dart b/tests/language_strong/type_variable_scope_test.dart index 04ee6eace2a..cfc770d80a0 100644 --- a/tests/language_strong/type_variable_scope_test.dart +++ b/tests/language_strong/type_variable_scope_test.dart @@ -8,11 +8,11 @@ class Foo { Foo() { } static - Foo //# 00: static type warning + Foo /// 00: static type warning m( - Foo //# 01: static type warning + Foo /// 01: static type warning f) { - Foo x = new Foo(); //# 02: static type warning + Foo x = new Foo(); /// 02: static type warning return new Foo(); } @@ -22,14 +22,14 @@ class Foo { } // T is not in scope for a static field. - static Foo f1; //# 03: static type warning + static Foo f1; /// 03: static type warning static - Foo //# 04: static type warning + Foo /// 04: static type warning get f { return new Foo(); } static void set f( - Foo //# 05: static type warning + Foo /// 05: static type warning value) {} } @@ -40,7 +40,7 @@ abstract class I { main() { Foo.m(new Foo()); new I(new Foo()); - Foo.f1 = new Foo(); //# 03: continued + Foo.f1 = new Foo(); /// 03: continued var x = Foo.f; Foo.f = x; } diff --git a/tests/language_strong/typevariable_substitution2_test.dart b/tests/language_strong/typevariable_substitution2_test.dart index 3a7149e3577..dffa91397c4 100644 --- a/tests/language_strong/typevariable_substitution2_test.dart +++ b/tests/language_strong/typevariable_substitution2_test.dart @@ -21,6 +21,6 @@ class C = B with M; main() { new A(null); - new C(''); //# 01: ok - checkDynamicTypeError(() => new C(0)); //# 02: static type warning + new C(''); /// 01: ok + checkDynamicTypeError(() => new C(0)); /// 02: static type warning } diff --git a/tests/language_strong/unbalanced_brace_test.dart b/tests/language_strong/unbalanced_brace_test.dart index d474d235c3a..29bf073bf03 100644 --- a/tests/language_strong/unbalanced_brace_test.dart +++ b/tests/language_strong/unbalanced_brace_test.dart @@ -6,11 +6,11 @@ class A { m() { - /* //# 01: compile-time error + /* /// 01: compile-time error } // */ -/* //# 02: compile-time error +/* /// 02: compile-time error } // */ diff --git a/tests/language_strong/unresolved_default_constructor_test.dart b/tests/language_strong/unresolved_default_constructor_test.dart index 82a33907319..3adbdd935c9 100644 --- a/tests/language_strong/unresolved_default_constructor_test.dart +++ b/tests/language_strong/unresolved_default_constructor_test.dart @@ -14,5 +14,5 @@ class A { main() { A.method(); - Expect.throws(() => new A()); //# 01: static type warning + Expect.throws(() => new A()); /// 01: static type warning } \ No newline at end of file diff --git a/tests/language_strong/unsigned_right_shift_test.dart b/tests/language_strong/unsigned_right_shift_test.dart index d4ee9f20284..0b5d197f151 100644 --- a/tests/language_strong/unsigned_right_shift_test.dart +++ b/tests/language_strong/unsigned_right_shift_test.dart @@ -6,7 +6,7 @@ main() { var foo = -10 - >>> 1 //# 01: compile-time error + >>> 1 /// 01: compile-time error ; - foo >>>= 1; //# 02: compile-time error + foo >>>= 1; /// 02: compile-time error } diff --git a/tests/language_strong/unsupported_operators_test.dart b/tests/language_strong/unsupported_operators_test.dart index d5ba5ebae93..a80987f11e2 100644 --- a/tests/language_strong/unsupported_operators_test.dart +++ b/tests/language_strong/unsupported_operators_test.dart @@ -9,10 +9,10 @@ library unsupported_operators; class C { m() { print( - super === //# 01: compile-time error + super === /// 01: compile-time error null); print( - super !== //# 02: compile-time error + super !== /// 02: compile-time error null); } } @@ -21,9 +21,9 @@ void main() { new C().m(); new C().m(); print( - "foo" === //# 03: compile-time error + "foo" === /// 03: compile-time error null); print( - "foo" !== //# 04: compile-time error + "foo" !== /// 04: compile-time error null); } \ No newline at end of file diff --git a/tests/language_strong/variable_declaration_metadata_test.dart b/tests/language_strong/variable_declaration_metadata_test.dart index bf60099ba00..7e0a6bd6b1a 100644 --- a/tests/language_strong/variable_declaration_metadata_test.dart +++ b/tests/language_strong/variable_declaration_metadata_test.dart @@ -8,28 +8,28 @@ const annotation = null; var - @annotation //# 01: compile-time error + @annotation /// 01: compile-time error v1, - @annotation //# 02: compile-time error + @annotation /// 02: compile-time error v2; int - @annotation //# 03: compile-time error + @annotation /// 03: compile-time error v3, - @annotation //# 04: compile-time error + @annotation /// 04: compile-time error v4; class C { var - @annotation //# 05: compile-time error + @annotation /// 05: compile-time error f1, - @annotation //# 06: compile-time error + @annotation /// 06: compile-time error f2; int - @annotation //# 07: compile-time error + @annotation /// 07: compile-time error f3, - @annotation //# 08: compile-time error + @annotation /// 08: compile-time error f4; } @@ -48,15 +48,15 @@ main() { use(c.f4); var - @annotation //# 09: compile-time error + @annotation /// 09: compile-time error l1, - @annotation //# 10: compile-time error + @annotation /// 10: compile-time error l2; int - @annotation //# 11: compile-time error + @annotation /// 11: compile-time error l3, - @annotation //# 12: compile-time error + @annotation /// 12: compile-time error l4; use(l1); @@ -65,9 +65,9 @@ main() { use(l4); for (var - @annotation //# 13: compile-time error + @annotation /// 13: compile-time error i1 = 0, - @annotation //# 14: compile-time error + @annotation /// 14: compile-time error i2 = 0; ; ) { use(i1); use(i2); @@ -75,9 +75,9 @@ main() { } for (int - @annotation //# 15: compile-time error + @annotation /// 15: compile-time error i3 = 0, - @annotation //# 16: compile-time error + @annotation /// 16: compile-time error i4 = 0; ; ) { use(i3); use(i4); diff --git a/tests/language_strong/wrong_number_type_arguments_test.dart b/tests/language_strong/wrong_number_type_arguments_test.dart index bc1da329723..4cfa40bf5b9 100644 --- a/tests/language_strong/wrong_number_type_arguments_test.dart +++ b/tests/language_strong/wrong_number_type_arguments_test.dart @@ -6,16 +6,16 @@ import "package:expect/expect.dart"; // Map takes 2 type arguments. Map - //# 00: static type warning + /// 00: static type warning foo; Map - //# 02: static type warning + /// 02: static type warning baz; main() { foo = null; var bar = new Map - //# 01: static type warning + /// 01: static type warning (); - baz = new Map(); //# 02: continued + baz = new Map(); /// 02: continued } diff --git a/tests/lib/async/future_or_bad_type_test.dart b/tests/lib/async/future_or_bad_type_test.dart index 07cb7176db2..73e957ec789 100644 --- a/tests/lib/async/future_or_bad_type_test.dart +++ b/tests/lib/async/future_or_bad_type_test.dart @@ -10,9 +10,9 @@ import 'dart:async'; import 'package:expect/expect.dart'; class A - extends FutureOr // //# extends: compile-time error - extends Object with FutureOr // //# with: compile-time error - implements FutureOr // //# implements: compile-time error + extends FutureOr // /// extends: compile-time error + extends Object with FutureOr // /// with: compile-time error + implements FutureOr // /// implements: compile-time error { } @@ -20,8 +20,8 @@ main() { // FutureOr should be treated like `dynamic`. Dynamically the `T` is // completely ignored. It can be a malformed type. Expect.isTrue(499 is FutureOr); - Expect.isTrue(499 is FutureOr>>); // //# 00: static type warning - Expect.isTrue(499 is FutureOr); // //# 01: static type warning + Expect.isTrue(499 is FutureOr>>); // /// 00: static type warning + Expect.isTrue(499 is FutureOr); // /// 01: static type warning var a = new A(); Expect.isTrue(a.toString() is String); diff --git a/tests/lib/async/future_or_only_in_async_test.dart b/tests/lib/async/future_or_only_in_async_test.dart index f48979d309f..daad62b1000 100644 --- a/tests/lib/async/future_or_only_in_async_test.dart +++ b/tests/lib/async/future_or_only_in_async_test.dart @@ -6,9 +6,9 @@ dynamic foo(dynamic x) { return x as - FutureOr< // //# 00: runtime error, static type warning + FutureOr< // /// 00: runtime error, static type warning int - > // //# 00: continued + > // /// 00: continued ; } diff --git a/tests/lib/async/future_test.dart b/tests/lib/async/future_test.dart index 2e64e729092..93c9c3a3bba 100644 --- a/tests/lib/async/future_test.dart +++ b/tests/lib/async/future_test.dart @@ -973,9 +973,9 @@ void testTypes() { new Future.delayed(Duration.ZERO, () => value)); testType("Future.microtask($value)", new Future.microtask(() => value)); - testType("Future.sync($value)", new Future.sync(() => value)); // //# 01: ok - testType("Future.sync(future($value))", // //# 01: continued - new Future.sync(() async => new Future.value(value))); //# 01: continued + testType("Future.sync($value)", new Future.sync(() => value)); // /// 01: ok + testType("Future.sync(future($value))", // /// 01: continued + new Future.sync(() async => new Future.value(value))); /// 01: continued testType("Future.value($value)", new Future.value(value)); } testType("Completer.future", new Completer().future); diff --git a/tests/lib/async/print_test.dart b/tests/lib/async/print_test.dart index 0f0acd10041..d2ca10b76ef 100644 --- a/tests/lib/async/print_test.dart +++ b/tests/lib/async/print_test.dart @@ -11,7 +11,7 @@ import 'package:expect/expect.dart'; class A { toString() { if (false - || true // //# 01: runtime error + || true // /// 01: runtime error ) { return 499; } else { diff --git a/tests/lib/async/run_zoned6_test.dart b/tests/lib/async/run_zoned6_test.dart index 35f4d9b3657..6117503b7c7 100644 --- a/tests/lib/async/run_zoned6_test.dart +++ b/tests/lib/async/run_zoned6_test.dart @@ -14,13 +14,13 @@ main() { runZoned(() { throw 0; }, onError: (e) { Expect.equals(0, e); - if (false) //# 01: runtime error + if (false) /// 01: runtime error asyncEnd(); - throw e; //# 01: runtime error + throw e; /// 01: runtime error }); } catch (e) { // We should never see an error here. - if (false) //# 01: continued + if (false) /// 01: continued rethrow; } } diff --git a/tests/lib/async/run_zoned9_test.dart b/tests/lib/async/run_zoned9_test.dart index 3d5dc80b5f1..9c07b4b525e 100644 --- a/tests/lib/async/run_zoned9_test.dart +++ b/tests/lib/async/run_zoned9_test.dart @@ -23,13 +23,13 @@ main() { Expect.equals(0, e); Expect.isTrue(sawInnerHandler); // If we are waiting for an error, don't asyncEnd, but let it time out. - if (false) //# 01: runtime error + if (false) /// 01: runtime error asyncEnd(); - throw e; // //# 01: continued + throw e; // /// 01: continued }); } catch (e) { // We should never see an error here. - if (false) // //# 01: continued + if (false) // /// 01: continued rethrow; } } diff --git a/tests/lib/convert/base64_test.dart b/tests/lib/convert/base64_test.dart index 4119625316f..bb58baf6350 100644 --- a/tests/lib/convert/base64_test.dart +++ b/tests/lib/convert/base64_test.dart @@ -266,8 +266,8 @@ void testErrors() { badEncode(0x100); badEncode(0x1000); badEncode(0x10000); - badEncode(0x100000000); // //# 01: ok - badEncode(0x10000000000000000); // //# 01: continued + badEncode(0x100000000); // /// 01: ok + badEncode(0x10000000000000000); // /// 01: continued } void testIssue25577() { diff --git a/tests/lib/mirrors/abstract_class_test.dart b/tests/lib/mirrors/abstract_class_test.dart index 30f3c278e94..00e108172df 100644 --- a/tests/lib/mirrors/abstract_class_test.dart +++ b/tests/lib/mirrors/abstract_class_test.dart @@ -130,7 +130,7 @@ abstract class NamedMA = S with M; class SubNamedMA extends NamedMA { mixinFoo() {} } -class ConcreteNamedMA = S with M; //# 00: static type warning +class ConcreteNamedMA = S with M; /// 00: static type warning abstract class NamedMA2 = S with M2; class SubNamedMA2 extends NamedMA2 { @@ -159,8 +159,8 @@ testNamedMixinApplication() { // Application is concrete. { // Mixin is abstract. - Expect.isFalse(reflectClass(ConcreteNamedMA).isAbstract); //# 00: ok - Expect.isFalse(reflectClass(ConcreteNamedMA).superclass.isAbstract); //# 00: ok + Expect.isFalse(reflectClass(ConcreteNamedMA).isAbstract); /// 00: ok + Expect.isFalse(reflectClass(ConcreteNamedMA).superclass.isAbstract); /// 00: ok // Mixin is concrete. Expect.isFalse(reflectClass(ConcreteNamedMA2).isAbstract); diff --git a/tests/lib/mirrors/circular_factory_redirection_test.dart b/tests/lib/mirrors/circular_factory_redirection_test.dart index bac6c918283..b8338545092 100644 --- a/tests/lib/mirrors/circular_factory_redirection_test.dart +++ b/tests/lib/mirrors/circular_factory_redirection_test.dart @@ -18,14 +18,14 @@ class B implements A { class C implements B { const C(); factory C.circular() - /* //# 01: compile-time error + /* /// 01: compile-time error = C; - */ = A.circular; //# 01: continued + */ = A.circular; /// 01: continued const factory C.circular2() - /* //# 02: compile-time error + /* /// 02: compile-time error = C; - */ = A.circular2; //# 02: continued + */ = A.circular2; /// 02: continued } main() { diff --git a/tests/lib/mirrors/class_declarations_test.dart b/tests/lib/mirrors/class_declarations_test.dart index 596f9c4e2ab..001309f6bc1 100644 --- a/tests/lib/mirrors/class_declarations_test.dart +++ b/tests/lib/mirrors/class_declarations_test.dart @@ -50,7 +50,7 @@ main() { 'setters'); // dart2js stops testing here. - return; // //# 01: ok + return; // /// 01: ok Expect.setEquals( ['Method(s(+) in s(Class))', diff --git a/tests/lib/mirrors/constructor_kinds_test.dart b/tests/lib/mirrors/constructor_kinds_test.dart index 488c86ce232..c7f45f8a793 100644 --- a/tests/lib/mirrors/constructor_kinds_test.dart +++ b/tests/lib/mirrors/constructor_kinds_test.dart @@ -32,14 +32,14 @@ main() { // that constructor properties are correctly set even if the constructor // hasn't been fully compiled. On dart2js, we want to check that constructors // are retain even if there are no base-level calls. - new ClassWithDefaultConstructor(); // //# 01: ok - new Class.generativeConstructor(); // //# 01: ok - new Class.redirectingGenerativeConstructor(); // //# 01: ok - new Class.factoryConstructor(); // //# 01: ok - new Class.redirectingFactoryConstructor(); // //# 01: ok - const Class.constGenerativeConstructor(); // //# 01: ok - const Class.constRedirectingGenerativeConstructor(); // //# 01: ok - const Class.constRedirectingFactoryConstructor(); // //# 01: ok + new ClassWithDefaultConstructor(); // /// 01: ok + new Class.generativeConstructor(); // /// 01: ok + new Class.redirectingGenerativeConstructor(); // /// 01: ok + new Class.factoryConstructor(); // /// 01: ok + new Class.redirectingFactoryConstructor(); // /// 01: ok + const Class.constGenerativeConstructor(); // /// 01: ok + const Class.constRedirectingGenerativeConstructor(); // /// 01: ok + const Class.constRedirectingFactoryConstructor(); // /// 01: ok cm = reflectClass(ClassWithDefaultConstructor); mm = cm.declarations.values diff --git a/tests/lib/mirrors/generic_bounded_by_type_parameter_test.dart b/tests/lib/mirrors/generic_bounded_by_type_parameter_test.dart index 388274a1de8..3b05fecf452 100644 --- a/tests/lib/mirrors/generic_bounded_by_type_parameter_test.dart +++ b/tests/lib/mirrors/generic_bounded_by_type_parameter_test.dart @@ -12,8 +12,8 @@ import 'generics_helper.dart'; class Super {} class Fixed extends Super {} -class Generic extends Super {} //# 02: static type warning -class Malbounded extends Super {} //# 01: static type warning +class Generic extends Super {} /// 02: static type warning +class Malbounded extends Super {} /// 01: static type warning bool inCheckedMode() { try { @@ -28,57 +28,57 @@ bool inCheckedMode() { main() { ClassMirror superDecl = reflectClass(Super); ClassMirror superOfNumAndInt = reflectClass(Fixed).superclass; - ClassMirror genericDecl = reflectClass(Generic); // //# 02: continued - ClassMirror superOfXAndY = genericDecl.superclass; // //# 02: continued - ClassMirror genericOfNumAndDouble = reflect(new Generic()).type; // //# 02: continued - ClassMirror superOfNumAndDouble = genericOfNumAndDouble.superclass; // //# 02: continued - ClassMirror superOfNumAndString = reflectClass(Malbounded).superclass; // //# 01: continued + ClassMirror genericDecl = reflectClass(Generic); // /// 02: continued + ClassMirror superOfXAndY = genericDecl.superclass; // /// 02: continued + ClassMirror genericOfNumAndDouble = reflect(new Generic()).type; // /// 02: continued + ClassMirror superOfNumAndDouble = genericOfNumAndDouble.superclass; // /// 02: continued + ClassMirror superOfNumAndString = reflectClass(Malbounded).superclass; // /// 01: continued try { - ClassMirror genericOfNumAndBool = reflect(new Generic()).type; // //# 02: static type warning - ClassMirror superOfNumAndBool = genericOfNumAndBool.superclass; // //# 02: continued - Expect.isFalse(genericOfNumAndBool.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfNumAndBool.isOriginalDeclaration); // //# 02: continued - typeParameters(genericOfNumAndBool, [#X, #Y]); // //# 02: continued - typeParameters(superOfNumAndBool, [#T, #R]); // //# 02: continued - typeArguments(genericOfNumAndBool, [reflectClass(num), reflectClass(bool)]); // //# 02: continued - typeArguments(superOfNumAndBool, [reflectClass(num), reflectClass(bool)]); // //# 02: continued - Expect.isFalse(inCheckedMode()); //# 02: continued + ClassMirror genericOfNumAndBool = reflect(new Generic()).type; // /// 02: static type warning + ClassMirror superOfNumAndBool = genericOfNumAndBool.superclass; // /// 02: continued + Expect.isFalse(genericOfNumAndBool.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfNumAndBool.isOriginalDeclaration); // /// 02: continued + typeParameters(genericOfNumAndBool, [#X, #Y]); // /// 02: continued + typeParameters(superOfNumAndBool, [#T, #R]); // /// 02: continued + typeArguments(genericOfNumAndBool, [reflectClass(num), reflectClass(bool)]); // /// 02: continued + typeArguments(superOfNumAndBool, [reflectClass(num), reflectClass(bool)]); // /// 02: continued + Expect.isFalse(inCheckedMode()); /// 02: continued } on TypeError catch(e) { Expect.isTrue(inCheckedMode()); } Expect.isTrue(superDecl.isOriginalDeclaration); Expect.isFalse(superOfNumAndInt.isOriginalDeclaration); - Expect.isTrue(genericDecl.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfXAndY.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(genericOfNumAndDouble.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfNumAndDouble.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfNumAndString.isOriginalDeclaration); // //# 01: continued + Expect.isTrue(genericDecl.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfXAndY.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(genericOfNumAndDouble.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfNumAndDouble.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfNumAndString.isOriginalDeclaration); // /// 01: continued TypeVariableMirror tFromSuper = superDecl.typeVariables[0]; TypeVariableMirror rFromSuper = superDecl.typeVariables[1]; - TypeVariableMirror xFromGeneric = genericDecl.typeVariables[0]; // //# 02: continued - TypeVariableMirror yFromGeneric = genericDecl.typeVariables[1]; // //# 02: continued + TypeVariableMirror xFromGeneric = genericDecl.typeVariables[0]; // /// 02: continued + TypeVariableMirror yFromGeneric = genericDecl.typeVariables[1]; // /// 02: continued Expect.equals(reflectClass(Object), tFromSuper.upperBound); Expect.equals(tFromSuper, rFromSuper.upperBound); - Expect.equals(reflectClass(Object), xFromGeneric.upperBound); // //# 02: continued - Expect.equals(reflectClass(Object), yFromGeneric.upperBound); // //# 02: continued + Expect.equals(reflectClass(Object), xFromGeneric.upperBound); // /// 02: continued + Expect.equals(reflectClass(Object), yFromGeneric.upperBound); // /// 02: continued typeParameters(superDecl, [#T, #R]); typeParameters(superOfNumAndInt, [#T, #R]); - typeParameters(genericDecl, [#X, #Y]); // //# 02: continued - typeParameters(superOfXAndY, [#T, #R]); // //# 02: continued - typeParameters(genericOfNumAndDouble, [#X, #Y]); // //# 02: continued - typeParameters(superOfNumAndDouble, [#T, #R]); // //# 02: continued - typeParameters(superOfNumAndString, [#T, #R]); // //# 01: continued + typeParameters(genericDecl, [#X, #Y]); // /// 02: continued + typeParameters(superOfXAndY, [#T, #R]); // /// 02: continued + typeParameters(genericOfNumAndDouble, [#X, #Y]); // /// 02: continued + typeParameters(superOfNumAndDouble, [#T, #R]); // /// 02: continued + typeParameters(superOfNumAndString, [#T, #R]); // /// 01: continued typeArguments(superDecl, []); typeArguments(superOfNumAndInt, [reflectClass(num), reflectClass(int)]); - typeArguments(genericDecl, []); // //# 02: continued - typeArguments(superOfXAndY, [xFromGeneric, yFromGeneric]); // //# 02: continued - typeArguments(genericOfNumAndDouble, [reflectClass(num), reflectClass(double)]); // //# 02: continued - typeArguments(superOfNumAndDouble, [reflectClass(num), reflectClass(double)]); // //# 02: continued - typeArguments(superOfNumAndString, [reflectClass(num), reflectClass(String)]); // //# 01: continued + typeArguments(genericDecl, []); // /// 02: continued + typeArguments(superOfXAndY, [xFromGeneric, yFromGeneric]); // /// 02: continued + typeArguments(genericOfNumAndDouble, [reflectClass(num), reflectClass(double)]); // /// 02: continued + typeArguments(superOfNumAndDouble, [reflectClass(num), reflectClass(double)]); // /// 02: continued + typeArguments(superOfNumAndString, [reflectClass(num), reflectClass(String)]); // /// 01: continued } diff --git a/tests/lib/mirrors/generic_bounded_test.dart b/tests/lib/mirrors/generic_bounded_test.dart index 5afc2283272..d581104acfd 100644 --- a/tests/lib/mirrors/generic_bounded_test.dart +++ b/tests/lib/mirrors/generic_bounded_test.dart @@ -13,8 +13,8 @@ import 'generics_helper.dart'; class Super {} class Fixed extends Super {} -class Generic extends Super {} // //# 02: static type warning -class Malbounded extends Super {} //# 01: static type warning +class Generic extends Super {} // /// 02: static type warning +class Malbounded extends Super {} /// 01: static type warning bool inCheckedMode() { try { @@ -29,55 +29,55 @@ bool inCheckedMode() { main() { ClassMirror superDecl = reflectClass(Super); ClassMirror superOfInt = reflectClass(Fixed).superclass; - ClassMirror genericDecl = reflectClass(Generic); // //# 02: continued - ClassMirror superOfR = genericDecl.superclass; // //# 02: continued - ClassMirror genericOfDouble = reflect(new Generic()).type; // //# 02: continued - ClassMirror superOfDouble = genericOfDouble.superclass; // //# 02: continued + ClassMirror genericDecl = reflectClass(Generic); // /// 02: continued + ClassMirror superOfR = genericDecl.superclass; // /// 02: continued + ClassMirror genericOfDouble = reflect(new Generic()).type; // /// 02: continued + ClassMirror superOfDouble = genericOfDouble.superclass; // /// 02: continued try { - ClassMirror genericOfBool = reflect(new Generic()).type; // //# 02: static type warning - ClassMirror superOfBool = genericOfBool.superclass; // //# 02: continued - Expect.isFalse(genericOfBool.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfBool.isOriginalDeclaration); // //# 02: continued - typeParameters(genericOfBool, [#R]); // //# 02: continued - typeParameters(superOfBool, [#T]); // //# 02: continued - typeArguments(genericOfBool, [reflectClass(bool)]); // //# 02: continued - typeArguments(superOfBool, [reflectClass(bool)]); // //# 02: continued - Expect.isFalse(inCheckedMode()); //# 02: continued + ClassMirror genericOfBool = reflect(new Generic()).type; // /// 02: static type warning + ClassMirror superOfBool = genericOfBool.superclass; // /// 02: continued + Expect.isFalse(genericOfBool.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfBool.isOriginalDeclaration); // /// 02: continued + typeParameters(genericOfBool, [#R]); // /// 02: continued + typeParameters(superOfBool, [#T]); // /// 02: continued + typeArguments(genericOfBool, [reflectClass(bool)]); // /// 02: continued + typeArguments(superOfBool, [reflectClass(bool)]); // /// 02: continued + Expect.isFalse(inCheckedMode()); /// 02: continued } on TypeError catch(e) { Expect.isTrue(inCheckedMode()); } - ClassMirror superOfString = reflectClass(Malbounded).superclass; // //# 01: continued + ClassMirror superOfString = reflectClass(Malbounded).superclass; // /// 01: continued Expect.isTrue(superDecl.isOriginalDeclaration); Expect.isFalse(superOfInt.isOriginalDeclaration); - Expect.isTrue(genericDecl.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfR.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(genericOfDouble.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfDouble.isOriginalDeclaration); // //# 02: continued + Expect.isTrue(genericDecl.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfR.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(genericOfDouble.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfDouble.isOriginalDeclaration); // /// 02: continued - Expect.isFalse(superOfString.isOriginalDeclaration); // //# 01: continued + Expect.isFalse(superOfString.isOriginalDeclaration); // /// 01: continued TypeVariableMirror tFromSuper = superDecl.typeVariables.single; - TypeVariableMirror rFromGeneric = genericDecl.typeVariables.single; // //# 02: continued + TypeVariableMirror rFromGeneric = genericDecl.typeVariables.single; // /// 02: continued Expect.equals(reflectClass(num), tFromSuper.upperBound); - Expect.equals(reflectClass(Object), rFromGeneric.upperBound); // //# 02: continued + Expect.equals(reflectClass(Object), rFromGeneric.upperBound); // /// 02: continued typeParameters(superDecl, [#T]); typeParameters(superOfInt, [#T]); - typeParameters(genericDecl, [#R]); // //# 02: continued - typeParameters(superOfR, [#T]); // //# 02: continued - typeParameters(genericOfDouble, [#R]); // //# 02: continued - typeParameters(superOfDouble, [#T]); // //# 02: continued - typeParameters(superOfString, [#T]); // //# 01: continued + typeParameters(genericDecl, [#R]); // /// 02: continued + typeParameters(superOfR, [#T]); // /// 02: continued + typeParameters(genericOfDouble, [#R]); // /// 02: continued + typeParameters(superOfDouble, [#T]); // /// 02: continued + typeParameters(superOfString, [#T]); // /// 01: continued typeArguments(superDecl, []); typeArguments(superOfInt, [reflectClass(int)]); - typeArguments(genericDecl, []); // //# 02: continued - typeArguments(superOfR, [rFromGeneric]); // //# 02: continued - typeArguments(genericOfDouble, [reflectClass(double)]); // //# 02: continued - typeArguments(superOfDouble, [reflectClass(double)]); // //# 02: continued - typeArguments(superOfString, [reflectClass(String)]); // //# 01: continued + typeArguments(genericDecl, []); // /// 02: continued + typeArguments(superOfR, [rFromGeneric]); // /// 02: continued + typeArguments(genericOfDouble, [reflectClass(double)]); // /// 02: continued + typeArguments(superOfDouble, [reflectClass(double)]); // /// 02: continued + typeArguments(superOfString, [reflectClass(String)]); // /// 01: continued } diff --git a/tests/lib/mirrors/generic_f_bounded_test.dart b/tests/lib/mirrors/generic_f_bounded_test.dart index 05a9fb895bb..bd368607301 100644 --- a/tests/lib/mirrors/generic_f_bounded_test.dart +++ b/tests/lib/mirrors/generic_f_bounded_test.dart @@ -52,7 +52,7 @@ main() { typeArguments(realDecl, []); typeArguments(sorterDecl, []); typeArguments(realSorterDecl, []); - typeArguments(magnitudeOfReal, [realDecl]); //# 01: ok - typeArguments(sorterOfReal, [realDecl]); //# 01: ok + typeArguments(magnitudeOfReal, [realDecl]); /// 01: ok + typeArguments(sorterOfReal, [realDecl]); /// 01: ok typeArguments(magnitudeOfR, [rFromSorter]); } diff --git a/tests/lib/mirrors/generic_interface_test.dart b/tests/lib/mirrors/generic_interface_test.dart index 0875a225155..a1266454b98 100644 --- a/tests/lib/mirrors/generic_interface_test.dart +++ b/tests/lib/mirrors/generic_interface_test.dart @@ -17,7 +17,7 @@ class Fixed implements Interface {} class Generic implements Interface {} class Bienbounded implements Bounded {} -class Malbounded implements Bounded {} // //# 01: static type warning +class Malbounded implements Bounded {} // /// 01: static type warning class FBounded implements Interface {} class Mixin {} @@ -37,7 +37,7 @@ main() { ClassMirror interfaceOfBool = reflect(new Generic()).type.superinterfaces.single; ClassMirror boundedOfInt = reflectClass(Bienbounded).superinterfaces.single; - ClassMirror boundedOfString = reflectClass(Malbounded).superinterfaces.single; // //# 01: continued + ClassMirror boundedOfString = reflectClass(Malbounded).superinterfaces.single; // /// 01: continued ClassMirror interfaceOfFBounded = reflectClass(FBounded).superinterfaces.single; ClassMirror interfaceOfInt2 = reflectClass(FixedMixinApplication).superinterfaces.single; @@ -55,7 +55,7 @@ main() { Expect.isFalse(interfaceOfR.isOriginalDeclaration); Expect.isFalse(interfaceOfBool.isOriginalDeclaration); Expect.isFalse(boundedOfInt.isOriginalDeclaration); - Expect.isFalse(boundedOfString.isOriginalDeclaration); // //# 01: continued + Expect.isFalse(boundedOfString.isOriginalDeclaration); // /// 01: continued Expect.isFalse(interfaceOfFBounded.isOriginalDeclaration); Expect.isFalse(interfaceOfInt2.isOriginalDeclaration); Expect.isFalse(interfaceOfX.isOriginalDeclaration); @@ -84,7 +84,7 @@ main() { typeParameters(interfaceOfR, [#T]); typeParameters(interfaceOfBool, [#T]); typeParameters(boundedOfInt, [#S]); - typeParameters(boundedOfString, [#S]); // //# 01: continued + typeParameters(boundedOfString, [#S]); // /// 01: continued typeParameters(interfaceOfFBounded, [#T]); typeParameters(interfaceOfInt2, [#T]); typeParameters(interfaceOfX, [#T]); @@ -99,7 +99,7 @@ main() { typeArguments(interfaceOfR, [rFromGeneric]); typeArguments(interfaceOfBool, [reflectClass(bool)]); typeArguments(boundedOfInt, [reflectClass(int)]); - typeArguments(boundedOfString, [reflectClass(String)]); // //# 01: continued + typeArguments(boundedOfString, [reflectClass(String)]); // /// 01: continued typeArguments(interfaceOfFBounded, [reflectClass(FBounded)]); typeArguments(interfaceOfInt2, [reflectClass(int)]); typeArguments(interfaceOfX, [xFromGenericMixinApplication]); diff --git a/tests/lib/mirrors/generic_superclass_test.dart b/tests/lib/mirrors/generic_superclass_test.dart index a0a7e03ba5f..ebf4c8cf96b 100644 --- a/tests/lib/mirrors/generic_superclass_test.dart +++ b/tests/lib/mirrors/generic_superclass_test.dart @@ -52,9 +52,9 @@ void testOriginals() { Expect.equals(reflectClass(Object), superA); Expect.equals(reflect(new A()).type, superB); - Expect.equals(reflect(new A()).type, superC); //# 01: ok + Expect.equals(reflect(new A()).type, superC); /// 01: ok Expect.equals(reflect(new U()).type, superB.typeArguments[0]); - Expect.equals(reflect(new C()).type, superC.typeArguments[0]); //# 01: ok + Expect.equals(reflect(new C()).type, superC.typeArguments[0]); /// 01: ok Expect.equals(dT, superD.typeArguments[0]); Expect.equals(eY, superE.typeArguments[0].typeArguments[0]); Expect.equals(feY, superInterfaceFF.typeArguments[0].typeArguments[0]); @@ -94,13 +94,13 @@ void testInstances() { Expect.equals(reflectClass(Object), superA); Expect.equals(reflect(new A()).type, superB); - Expect.equals(reflect(new A()).type, superC); //# 01: ok + Expect.equals(reflect(new A()).type, superC); /// 01: ok Expect.equals(reflect(new A()).type, superD); Expect.equals(reflect(new G>()).type, superE); Expect.equals(reflect(new G>>()).type, superE0); Expect.equals(reflect(new G>()).type, superInterfaceFF); Expect.equals(u, superB.typeArguments[0]); - Expect.equals(reflect(new C()).type, superC.typeArguments[0]); //# 01: ok + Expect.equals(reflect(new C()).type, superC.typeArguments[0]); /// 01: ok Expect.equals(u, superD.typeArguments[0]); Expect.equals(r, superE.typeArguments[0].typeArguments[0]); Expect.equals(hr, superE0.typeArguments[0].typeArguments[0]); diff --git a/tests/lib/mirrors/generics_double_substitution_test.dart b/tests/lib/mirrors/generics_double_substitution_test.dart index ea3f5bc14d8..5eae4e6a1aa 100644 --- a/tests/lib/mirrors/generics_double_substitution_test.dart +++ b/tests/lib/mirrors/generics_double_substitution_test.dart @@ -29,5 +29,5 @@ main() { Expect.equals(aOfString, parameterType.parameters.single.type); ClassMirror typeArgOfSuperclass = cOfString.superclass.typeArguments.single; - Expect.equals(aOfString, typeArgOfSuperclass); // //# 01: ok + Expect.equals(aOfString, typeArgOfSuperclass); // /// 01: ok } diff --git a/tests/lib/mirrors/generics_test.dart b/tests/lib/mirrors/generics_test.dart index 4abe39c3299..fd9b105b2ab 100644 --- a/tests/lib/mirrors/generics_test.dart +++ b/tests/lib/mirrors/generics_test.dart @@ -13,7 +13,7 @@ class A {} class Z {} class B extends A {} class C - extends A // //# 01: static type warning + extends A // /// 01: static type warning {} class D extends A {} class E extends A {} diff --git a/tests/lib/mirrors/get_field_static_test.dart b/tests/lib/mirrors/get_field_static_test.dart index 4914cb90170..2a42aa1ae27 100644 --- a/tests/lib/mirrors/get_field_static_test.dart +++ b/tests/lib/mirrors/get_field_static_test.dart @@ -26,6 +26,6 @@ main() { Expect.equals(499, cm.getField(#bar).reflectee); Expect.equals(42, cm.getField(#x).reflectee); - Expect.equals("toto", cm.getField(#y).reflectee); // //# 00: ok - Expect.equals(true, cm.getField(#z).reflectee); // //# 00: ok + Expect.equals("toto", cm.getField(#y).reflectee); // /// 00: ok + Expect.equals(true, cm.getField(#z).reflectee); // /// 00: ok } diff --git a/tests/lib/mirrors/globalized_closures2_test.dart b/tests/lib/mirrors/globalized_closures2_test.dart index 0ef541c6ec7..b842b6ea5ab 100644 --- a/tests/lib/mirrors/globalized_closures2_test.dart +++ b/tests/lib/mirrors/globalized_closures2_test.dart @@ -33,5 +33,5 @@ main() { collectedParents.add(MirrorSystem.getName(c.superclass.simpleName)); } }; - Expect.isTrue(collectedParents.isEmpty); // //# 00: ok + Expect.isTrue(collectedParents.isEmpty); // /// 00: ok } diff --git a/tests/lib/mirrors/globalized_closures_test.dart b/tests/lib/mirrors/globalized_closures_test.dart index 7705f4c8109..80b9a1fa140 100644 --- a/tests/lib/mirrors/globalized_closures_test.dart +++ b/tests/lib/mirrors/globalized_closures_test.dart @@ -33,5 +33,5 @@ main() { collectedParents.add(MirrorSystem.getName(c.superclass.simpleName)); } }; - Expect.listEquals(["Object"], collectedParents); // //# 00: ok + Expect.listEquals(["Object"], collectedParents); // /// 00: ok } diff --git a/tests/lib/mirrors/initializing_formals_test.dart b/tests/lib/mirrors/initializing_formals_test.dart index d052b76bf52..4ebb0923180 100644 --- a/tests/lib/mirrors/initializing_formals_test.dart +++ b/tests/lib/mirrors/initializing_formals_test.dart @@ -39,10 +39,10 @@ main() { pm = mm.parameters.single; Expect.equals(#intField, pm.simpleName); Expect.equals(reflectClass(int), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -51,10 +51,10 @@ main() { pm = mm.parameters.single; Expect.equals(#boolField, pm.simpleName); Expect.equals(reflectClass(bool), pm.type); - Expect.isTrue(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isTrue(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isTrue(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isTrue(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -63,11 +63,11 @@ main() { pm = mm.parameters.single; Expect.equals(#stringField, pm.simpleName); Expect.equals(reflectClass(String), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isTrue(pm.isOptional); // //# 01: ok - Expect.isTrue(pm.hasDefaultValue); // //# 01: ok - Expect.equals('default', pm.defaultValue.reflectee); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isTrue(pm.isOptional); // /// 01: ok + Expect.isTrue(pm.hasDefaultValue); // /// 01: ok + Expect.equals('default', pm.defaultValue.reflectee); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -76,22 +76,22 @@ main() { pm = mm.parameters.single; Expect.equals(#tField, pm.simpleName); Expect.equals(reflectClass(Class).typeVariables.single, pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); mm = reflectClass(Class).declarations[#Class.private]; pm = mm.parameters.single; - Expect.equals(#_privateField, pm.simpleName); // //# 03: ok + Expect.equals(#_privateField, pm.simpleName); // /// 03: ok Expect.equals(currentMirrorSystem().dynamicType, pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isTrue(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -100,10 +100,10 @@ main() { pm = mm.parameters.single; Expect.equals(#intField, pm.simpleName); Expect.equals(reflectClass(num), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -112,10 +112,10 @@ main() { pm = mm.parameters.single; Expect.equals(#intField, pm.simpleName); Expect.equals(reflectClass(int), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -124,10 +124,10 @@ main() { pm = mm.parameters.single; Expect.equals(#intField, pm.simpleName); Expect.equals(currentMirrorSystem().dynamicType, pm.type); // N.B. - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -136,10 +136,10 @@ main() { pm = mm.parameters.single; Expect.equals(#value, pm.simpleName); Expect.equals(reflectClass(num), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // N.B. // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // N.B. // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -148,10 +148,10 @@ main() { pm = mm.parameters.single; Expect.equals(#value, pm.simpleName); Expect.equals(reflectClass(num), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isTrue(pm.isFinal); // N.B. // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isTrue(pm.isFinal); // N.B. // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); diff --git a/tests/lib/mirrors/invocation_fuzz_test.dart b/tests/lib/mirrors/invocation_fuzz_test.dart index 493c51871ed..c43b5c445bc 100644 --- a/tests/lib/mirrors/invocation_fuzz_test.dart +++ b/tests/lib/mirrors/invocation_fuzz_test.dart @@ -180,10 +180,10 @@ var fuzzArgument; main() { fuzzArgument = null; - fuzzArgument = 1; // //# smi: ok - fuzzArgument = false; // //# false: ok - fuzzArgument = 'string'; // //# string: ok - fuzzArgument = new List(0); // //# emptyarray: ok + fuzzArgument = 1; // /// smi: ok + fuzzArgument = false; // /// false: ok + fuzzArgument = 'string'; // /// string: ok + fuzzArgument = new List(0); // /// emptyarray: ok print('Fuzzing with $fuzzArgument'); diff --git a/tests/lib/mirrors/invoke_call_through_getter_previously_accessed_test.dart b/tests/lib/mirrors/invoke_call_through_getter_previously_accessed_test.dart index 257660d98db..14a3157a341 100644 --- a/tests/lib/mirrors/invoke_call_through_getter_previously_accessed_test.dart +++ b/tests/lib/mirrors/invoke_call_through_getter_previously_accessed_test.dart @@ -51,8 +51,8 @@ testInstanceReflective() { im.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 C 11 12 13 null', im.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 C 14 15 null 16', // //# named: ok - im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 C 14 15 null 16', // /// named: ok + im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.equals('DNU', im.invoke(#doesNotExist, [17, 18]).reflectee); Expect.throws(() => im.invoke(#closure, ['wrong arity']), @@ -90,8 +90,8 @@ testClassReflective() { cm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', cm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => cm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } @@ -123,8 +123,8 @@ testLibraryReflective() { lm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', lm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => lm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } diff --git a/tests/lib/mirrors/invoke_call_through_getter_test.dart b/tests/lib/mirrors/invoke_call_through_getter_test.dart index 72e6b6c8583..80a1fdedc4d 100644 --- a/tests/lib/mirrors/invoke_call_through_getter_test.dart +++ b/tests/lib/mirrors/invoke_call_through_getter_test.dart @@ -51,8 +51,8 @@ testInstanceReflective() { im.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 C 11 12 13 null', im.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 C 14 15 null 16', // //# named: ok - im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 C 14 15 null 16', // /// named: ok + im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.equals('DNU', im.invoke(#doesNotExist, [17, 18]).reflectee); Expect.throws(() => im.invoke(#closure, ['wrong arity']), @@ -90,8 +90,8 @@ testClassReflective() { cm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', cm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => cm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } @@ -123,8 +123,8 @@ testLibraryReflective() { lm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', lm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => lm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } diff --git a/tests/lib/mirrors/invoke_call_through_implicit_getter_previously_accessed_test.dart b/tests/lib/mirrors/invoke_call_through_implicit_getter_previously_accessed_test.dart index c020124f57f..f9866a593db 100644 --- a/tests/lib/mirrors/invoke_call_through_implicit_getter_previously_accessed_test.dart +++ b/tests/lib/mirrors/invoke_call_through_implicit_getter_previously_accessed_test.dart @@ -57,8 +57,8 @@ testInstanceReflective() { im.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 C 11 12 13 null', im.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 C 14 15 null 16', // //# named: ok - im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 C 14 15 null 16', // /// named: ok + im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.equals('DNU', im.invoke(#doesNotExist, [17, 18]).reflectee); Expect.throws(() => im.invoke(#closure, ['wrong arity']), @@ -96,8 +96,8 @@ testClassReflective() { cm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', cm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => cm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } @@ -129,8 +129,8 @@ testLibraryReflective() { lm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', lm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => lm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } diff --git a/tests/lib/mirrors/invoke_named_test.dart b/tests/lib/mirrors/invoke_named_test.dart index 50e8be5d4f2..feee0ab1a4c 100644 --- a/tests/lib/mirrors/invoke_named_test.dart +++ b/tests/lib/mirrors/invoke_named_test.dart @@ -281,7 +281,7 @@ testSyncApply() { } main() { - isDart2js = true; //# 01: ok + isDart2js = true; /// 01: ok testSyncInvoke(reflect(new C())); // InstanceMirror diff --git a/tests/lib/mirrors/library_declarations_test.dart b/tests/lib/mirrors/library_declarations_test.dart index 1e597931200..5e78a217cf3 100644 --- a/tests/lib/mirrors/library_declarations_test.dart +++ b/tests/lib/mirrors/library_declarations_test.dart @@ -23,7 +23,7 @@ main() { 'variables'); // dart2js stops testing here. - return; // //# 01: ok + return; // /// 01: ok Expect.setEquals( ['Method(s(_libraryGetter)' diff --git a/tests/lib/mirrors/library_imports_bad_metadata_test.dart b/tests/lib/mirrors/library_imports_bad_metadata_test.dart index 43d873bab70..82069465bf7 100644 --- a/tests/lib/mirrors/library_imports_bad_metadata_test.dart +++ b/tests/lib/mirrors/library_imports_bad_metadata_test.dart @@ -4,7 +4,7 @@ library test.library_imports_bad_metadata; -@undefined // //# 01: compile-time error +@undefined // /// 01: compile-time error import 'dart:mirrors'; import 'package:expect/expect.dart'; diff --git a/tests/lib/mirrors/library_metadata2_test.dart b/tests/lib/mirrors/library_metadata2_test.dart index c149cf3af54..8c4000cc58d 100644 --- a/tests/lib/mirrors/library_metadata2_test.dart +++ b/tests/lib/mirrors/library_metadata2_test.dart @@ -6,7 +6,7 @@ import 'dart:mirrors'; import 'library_metadata2_lib1.dart'; -import 'library_metadata2_lib2.dart'; //# 01: compile-time error +import 'library_metadata2_lib2.dart'; /// 01: compile-time error void main() { for (var library in currentMirrorSystem().libraries.values) { diff --git a/tests/lib/mirrors/list_constructor_test.dart b/tests/lib/mirrors/list_constructor_test.dart index 87125c5caad..c25d038ac9d 100644 --- a/tests/lib/mirrors/list_constructor_test.dart +++ b/tests/lib/mirrors/list_constructor_test.dart @@ -18,7 +18,7 @@ main() { list[0] = 1; Expect.equals(1, list[0]); - testGrowableList(); //# 01: ok + testGrowableList(); /// 01: ok } testGrowableList() { diff --git a/tests/lib/mirrors/metadata_allowed_values_test.dart b/tests/lib/mirrors/metadata_allowed_values_test.dart index b929f639444..92c43f576f9 100644 --- a/tests/lib/mirrors/metadata_allowed_values_test.dart +++ b/tests/lib/mirrors/metadata_allowed_values_test.dart @@ -10,7 +10,7 @@ import 'package:expect/expect.dart'; import 'metadata_allowed_values_import.dart'; // Unprefixed. import 'metadata_allowed_values_import.dart' as prefix; -@A // //# 01: compile-time error +@A // /// 01: compile-time error class A {} @B.CONSTANT @@ -30,43 +30,43 @@ class D { const D.named(this.field); } -@E.NOT_CONSTANT // //# 02: compile-time error +@E.NOT_CONSTANT // /// 02: compile-time error class E { static var NOT_CONSTANT = 3; } -@F(6) // //# 03: compile-time error +@F(6) // /// 03: compile-time error class F { final field; F(this.field); } -@G.named(4) // //# 04: compile-time error +@G.named(4) // /// 04: compile-time error class G { final field; G.named(this.field); } -@H() // //# 05: compile-time error +@H() // /// 05: compile-time error class H { const H(); } -@I[0] // //# 06: compile-time error +@I[0] // /// 06: compile-time error class I {} -@this.toString // //# 07: compile-time error +@this.toString // /// 07: compile-time error class J {} -@super.toString // //# 08: compile-time error +@super.toString // /// 08: compile-time error class K {} -@L.func() // //# 09: compile-time error +@L.func() // /// 09: compile-time error class L { static func() => 6; } -@Imported // //# 10: compile-time error +@Imported // /// 10: compile-time error class M {} @Imported() @@ -78,7 +78,7 @@ class O {} @Imported.CONSTANT class P {} -@prefix.Imported // //# 11: compile-time error +@prefix.Imported // /// 11: compile-time error class Q {} @prefix.Imported() @@ -90,84 +90,84 @@ class S {} @prefix.Imported.CONSTANT class T {} -@U..toString() // //# 12: compile-time error +@U..toString() // /// 12: compile-time error class U {} -@V.tearOff // //# 13: compile-time error +@V.tearOff // /// 13: compile-time error class V { static tearOff() {} } topLevelTearOff() => 4; -@topLevelTearOff // //# 14: compile-time error +@topLevelTearOff // /// 14: compile-time error class W {} -@TypeParameter // //# 15: compile-time error +@TypeParameter // /// 15: compile-time error class X {} -@TypeParameter.member // //# 16: compile-time error +@TypeParameter.member // /// 16: compile-time error class Y {} -@1 // //# 17: compile-time error +@1 // /// 17: compile-time error class Z {} -@3.14 // //# 18: compile-time error +@3.14 // /// 18: compile-time error class AA {} -@'string' // //# 19: compile-time error +@'string' // /// 19: compile-time error class BB {} -@#symbol // //# 20: compile-time error +@#symbol // /// 20: compile-time error class CC {} -@['element'] // //# 21: compile-time error +@['element'] // /// 21: compile-time error class DD {} -@{'key': 'value'} // //# 22: compile-time error +@{'key': 'value'} // /// 22: compile-time error class EE {} -@true // //# 23: compile-time error +@true // /// 23: compile-time error class FF {} -@false // //# 24: compile-time error +@false // /// 24: compile-time error class GG {} -@null // //# 25: compile-time error +@null // /// 25: compile-time error class HH {} const a = const [1, 2, 3]; @a class II {} -@a[0] // //# 26: compile-time error +@a[0] // /// 26: compile-time error class JJ {} -@kk // //# 27: compile-time error +@kk // /// 27: compile-time error class KK { const KK(); } get kk => const KK(); -@LL(() => 42) // //# 28: compile-time error +@LL(() => 42) // /// 28: compile-time error class LL { final field; const LL(this.field); } -@MM((x) => 42) // //# 29: compile-time error +@MM((x) => 42) // /// 29: compile-time error class MM { final field; const MM(this.field); } -@NN(() {}) // //# 30: compile-time error +@NN(() {}) // /// 30: compile-time error class NN { final field; const NN(this.field); } -@OO(() { () {} }) // //# 31: compile-time error +@OO(() { () {} }) // /// 31: compile-time error class OO { final field; const OO(this.field); diff --git a/tests/lib/mirrors/metadata_constructor_arguments_test.dart b/tests/lib/mirrors/metadata_constructor_arguments_test.dart index 361d0677af2..03e1c24e6af 100644 --- a/tests/lib/mirrors/metadata_constructor_arguments_test.dart +++ b/tests/lib/mirrors/metadata_constructor_arguments_test.dart @@ -14,7 +14,7 @@ class Tag { const Tag({named}) : this.name = named; } -@Tag(named: undefined) // //# 01: compile-time error +@Tag(named: undefined) // /// 01: compile-time error class A {} @Tag(named: 'valid') @@ -25,32 +25,32 @@ class C { static const STATIC_FIELD = 3; } -@Tag(named: D.instanceMethod()) // //# 02: compile-time error +@Tag(named: D.instanceMethod()) // /// 02: compile-time error class D { instanceMethod() {} } -@Tag(named: instanceField) // //# 03: compile-time error +@Tag(named: instanceField) // /// 03: compile-time error class E { var instanceField; } -@Tag(named: F.nonConstStaticField) // //# 04: compile-time error +@Tag(named: F.nonConstStaticField) // /// 04: compile-time error class F { static var nonConstStaticField = 6; } -@Tag(named: instanceMethod) // //# 05: compile-time error +@Tag(named: instanceMethod) // /// 05: compile-time error class G { instanceMethod() {} } -@Tag(named: this) // //# 06: compile-time error +@Tag(named: this) // /// 06: compile-time error class H { instanceMethod() {} } -@Tag(named: super) // //# 07: compile-time error +@Tag(named: super) // /// 07: compile-time error class I { instanceMethod() {} } diff --git a/tests/lib/mirrors/metadata_nested_constructor_call_test.dart b/tests/lib/mirrors/metadata_nested_constructor_call_test.dart index 0d772288eeb..1ac85d5172c 100644 --- a/tests/lib/mirrors/metadata_nested_constructor_call_test.dart +++ b/tests/lib/mirrors/metadata_nested_constructor_call_test.dart @@ -28,33 +28,33 @@ class B {} @Box(const Box(const Box())) class C {} -@Box(const Box(const MutableBox())) // //# 01: compile-time error +@Box(const Box(const MutableBox())) // /// 01: compile-time error class D {} -@Box(const MutableBox(const Box())) // //# 02: compile-time error +@Box(const MutableBox(const Box())) // /// 02: compile-time error class E {} -@Box(Box()) // //# 03: compile-time error +@Box(Box()) // /// 03: compile-time error class F {} -@Box(Box(const Box())) // //# 04: compile-time error +@Box(Box(const Box())) // /// 04: compile-time error class G {} -@Box(Box(const MutableBox())) // //# 05: compile-time error +@Box(Box(const MutableBox())) // /// 05: compile-time error class H {} -@Box(MutableBox(const Box())) // //# 06: compile-time error +@Box(MutableBox(const Box())) // /// 06: compile-time error class I {} final closure = () => 42; -@Box(closure()) // //# 07: compile-time error +@Box(closure()) // /// 07: compile-time error class J {} -@Box(closure) // //# 08: compile-time error +@Box(closure) // /// 08: compile-time error class K {} function() => 42; -@Box(function()) // //# 09: compile-time error +@Box(function()) // /// 09: compile-time error class L {} // N.B. This is legal, but @function is not (tested by metadata_allowed_values). diff --git a/tests/lib/mirrors/metadata_scope_test.dart b/tests/lib/mirrors/metadata_scope_test.dart index 6f20ea1ab76..6f4a050dad3 100644 --- a/tests/lib/mirrors/metadata_scope_test.dart +++ b/tests/lib/mirrors/metadata_scope_test.dart @@ -15,7 +15,7 @@ class Annotation { // Note there is no compile-time constant 'foo' in scope. In particular, A.foo // is not in scope here. -@Annotation(foo) // //# 01: compile-time error +@Annotation(foo) // /// 01: compile-time error class A <@Annotation(foo) T> { @Annotation(foo) static foo() {} diff --git a/tests/lib/mirrors/mirror_in_static_init_test.dart b/tests/lib/mirrors/mirror_in_static_init_test.dart index 6124d9f885f..471675e38ce 100644 --- a/tests/lib/mirrors/mirror_in_static_init_test.dart +++ b/tests/lib/mirrors/mirror_in_static_init_test.dart @@ -14,7 +14,7 @@ import 'dart:mirrors'; abstract class C { int _a; // This is a syntax error on purpose. - C([this._a: 0]); //# 01: compile-time error + C([this._a: 0]); /// 01: compile-time error } final int staticField = () { diff --git a/tests/lib/mirrors/mirrors_nsm_test.dart b/tests/lib/mirrors/mirrors_nsm_test.dart index b236e79ae75..2364f925b18 100644 --- a/tests/lib/mirrors/mirrors_nsm_test.dart +++ b/tests/lib/mirrors/mirrors_nsm_test.dart @@ -116,5 +116,5 @@ testMatchingMessages() { main() { testMessageContents(); - testMatchingMessages(); //# dart2js: ok + testMatchingMessages(); /// dart2js: ok } \ No newline at end of file diff --git a/tests/lib/mirrors/mirrors_used_typedef_declaration_test.dart b/tests/lib/mirrors/mirrors_used_typedef_declaration_test.dart index aa616e228d7..1c3b53c2cd7 100644 --- a/tests/lib/mirrors/mirrors_used_typedef_declaration_test.dart +++ b/tests/lib/mirrors/mirrors_used_typedef_declaration_test.dart @@ -23,7 +23,7 @@ main() { // The following code does not currenty work on the VM, because it does not // support MirrorsUsed (see dartbug.com/16048). - Mirror barMirror = thisLibrary.declarations[#Bar]; // //# 01: ok - Expect.isTrue(barMirror == null, // //# 01: continued - 'Bar should not be emitted due to MirrorsUsed.'); //# 01: continued + Mirror barMirror = thisLibrary.declarations[#Bar]; // /// 01: ok + Expect.isTrue(barMirror == null, // /// 01: continued + 'Bar should not be emitted due to MirrorsUsed.'); /// 01: continued } diff --git a/tests/lib/mirrors/parameter_is_const_test.dart b/tests/lib/mirrors/parameter_is_const_test.dart index 63696e3e590..45185a9b88d 100644 --- a/tests/lib/mirrors/parameter_is_const_test.dart +++ b/tests/lib/mirrors/parameter_is_const_test.dart @@ -10,7 +10,7 @@ import 'package:expect/expect.dart'; class Class { foo( - const //# 01: compile-time error + const /// 01: compile-time error param) {} } diff --git a/tests/lib/mirrors/parameter_test.dart b/tests/lib/mirrors/parameter_test.dart index dd60eb59423..0bd649b59c4 100644 --- a/tests/lib/mirrors/parameter_test.dart +++ b/tests/lib/mirrors/parameter_test.dart @@ -79,7 +79,7 @@ main() { barConstructor.returnType); // dart2js stops testing here. - return; // //# 01: ok + return; // /// 01: ok MethodMirror bazConstructor = constructors[#B.baz]; expect('Method(s(B.baz) in s(B), constructor)', bazConstructor); diff --git a/tests/lib/mirrors/raw_type_test.dart b/tests/lib/mirrors/raw_type_test.dart index 911a8afec29..d57e48660e5 100644 --- a/tests/lib/mirrors/raw_type_test.dart +++ b/tests/lib/mirrors/raw_type_test.dart @@ -18,5 +18,5 @@ main() { var barSupertype = reflect(new Bar()).type.superclass; var barSuperclass = barSupertype.originalDeclaration; Expect.equals(fooDeclaration, barSuperclass, 'declarations'); - Expect.equals(fooType, barSupertype, 'types'); //# 01: ok + Expect.equals(fooType, barSupertype, 'types'); /// 01: ok } diff --git a/tests/lib/mirrors/redirecting_factory_different_type_test.dart b/tests/lib/mirrors/redirecting_factory_different_type_test.dart index 126198718e8..6a6742efd79 100644 --- a/tests/lib/mirrors/redirecting_factory_different_type_test.dart +++ b/tests/lib/mirrors/redirecting_factory_different_type_test.dart @@ -11,7 +11,7 @@ import 'package:expect/expect.dart'; class A { factory A( - String // //# 01: static type warning + String // /// 01: static type warning x) = B; A._(); } diff --git a/tests/lib/mirrors/redirecting_factory_test.dart b/tests/lib/mirrors/redirecting_factory_test.dart index 1bf784c417c..b6112858f42 100644 --- a/tests/lib/mirrors/redirecting_factory_test.dart +++ b/tests/lib/mirrors/redirecting_factory_test.dart @@ -43,7 +43,7 @@ class Class { factory Class.redirectingFactoryStringTypeParameters(a, b) = Class - // //# 02: static type warning + // /// 02: static type warning .factoryNoOptional; factory Class.redirectingFactoryTypeParameters(a, b) = @@ -85,7 +85,7 @@ main() { Expect.isTrue(instanceMirror.reflectee is Class); bool isDart2js = false; - isDart2js = true; //# 01: ok + isDart2js = true; /// 01: ok if (isDart2js) return; instanceMirror = classMirror.newInstance( diff --git a/tests/lib/mirrors/reflect_class_test.dart b/tests/lib/mirrors/reflect_class_test.dart index 1ab9c885cea..b2272cf47eb 100644 --- a/tests/lib/mirrors/reflect_class_test.dart +++ b/tests/lib/mirrors/reflect_class_test.dart @@ -12,7 +12,7 @@ main() { Function expectedError = (e) => e is ArgumentError || e is TypeError; Expect.throws(() => reflectClass(dynamic), expectedError); - Expect.throws(() => reflectClass(1), expectedError); // //# 01: static type warning - Expect.throws(() => reflectClass("string"), expectedError); // //# 02: static type warning + Expect.throws(() => reflectClass(1), expectedError); // /// 01: static type warning + Expect.throws(() => reflectClass("string"), expectedError); // /// 02: static type warning Expect.throws(() => reflectClass(FooFunction), expectedError); } diff --git a/tests/lib/mirrors/reflected_type_classes_test.dart b/tests/lib/mirrors/reflected_type_classes_test.dart index 82fef37ffec..1f9b7ce4ed5 100644 --- a/tests/lib/mirrors/reflected_type_classes_test.dart +++ b/tests/lib/mirrors/reflected_type_classes_test.dart @@ -10,7 +10,7 @@ import 'reflected_type_helper.dart'; class A {} class B extends A {} -class C extends A {} // //# 01: static type warning +class C extends A {} // /// 01: static type warning class D extends A {} class E extends A {} class F extends A {} @@ -21,7 +21,7 @@ main() { // Declarations. expectReflectedType(reflectClass(A), null); expectReflectedType(reflectClass(B), B); - expectReflectedType(reflectClass(C), C); // //# 01: continued + expectReflectedType(reflectClass(C), C); // /// 01: continued expectReflectedType(reflectClass(D), D); expectReflectedType(reflectClass(E), null); expectReflectedType(reflectClass(F), null); @@ -31,7 +31,7 @@ main() { // Instantiations. expectReflectedType(reflect(new A()).type, new A().runtimeType); expectReflectedType(reflect(new B()).type, new B().runtimeType); - expectReflectedType(reflect(new C()).type, new C().runtimeType); // //# 01: continued + expectReflectedType(reflect(new C()).type, new C().runtimeType); // /// 01: continued expectReflectedType(reflect(new D()).type, new D().runtimeType); expectReflectedType(reflect(new E()).type, new E().runtimeType); expectReflectedType(reflect(new F()).type, new F().runtimeType); @@ -39,12 +39,12 @@ main() { expectReflectedType(reflect(new H()).type, new H().runtimeType); expectReflectedType(reflect(new A()).type, new A().runtimeType); - expectReflectedType(reflect(new B()).type.superclass, // //# 02: static type warning - new A().runtimeType); // //# 02: continued - expectReflectedType(reflect(new C()).type.superclass, // //# 01: continued - new A().runtimeType); // //# 01: continued - expectReflectedType(reflect(new D()).type.superclass, // //# 03: static type warning - new A().runtimeType); // //# 03: continued + expectReflectedType(reflect(new B()).type.superclass, // /// 02: static type warning + new A().runtimeType); // /// 02: continued + expectReflectedType(reflect(new C()).type.superclass, // /// 01: continued + new A().runtimeType); // /// 01: continued + expectReflectedType(reflect(new D()).type.superclass, // /// 03: static type warning + new A().runtimeType); // /// 03: continued expectReflectedType(reflect(new E()).type, new E().runtimeType); expectReflectedType(reflect(new E()).type.superclass, new A().runtimeType); diff --git a/tests/lib/mirrors/reflected_type_generics_test.dart b/tests/lib/mirrors/reflected_type_generics_test.dart index bae1b681f19..fa17cd62ad3 100644 --- a/tests/lib/mirrors/reflected_type_generics_test.dart +++ b/tests/lib/mirrors/reflected_type_generics_test.dart @@ -47,7 +47,7 @@ main() { reflectType(FBounded, [FBounded]), new FBounded().runtimeType); var predicateHelper = new Helper>(); - expectReflectedType(reflectType(Predicate, [P]), predicateHelper.param); //# 01: ok + expectReflectedType(reflectType(Predicate, [P]), predicateHelper.param); /// 01: ok var composite = new Composite(); expectReflectedType(reflectType(Composite, [P, int]), composite.runtimeType); @@ -57,40 +57,40 @@ main() { (e) => e is ArgumentError && e.invalidValue is List, "Should throw an ArgumentError if reflecting not a generic class with " "empty list of type arguments"); - Expect.throws( // //# 03: ok - () => reflectType(P, [B]), // //# 03: continued - (e) => e is Error, // //# 03: continued - "Should throw an ArgumentError if reflecting not a generic class with " //# 03: continued - "some type arguments"); // //# 03: continued + Expect.throws( // /// 03: ok + () => reflectType(P, [B]), // /// 03: continued + (e) => e is Error, // /// 03: continued + "Should throw an ArgumentError if reflecting not a generic class with " /// 03: continued + "some type arguments"); // /// 03: continued Expect.throws( () => reflectType(A, []), (e) => e is ArgumentError && e.invalidValue is List, "Should throw an ArgumentError if type argument list is empty for a " "generic class"); - Expect.throws( // //# 04: ok - () => reflectType(A, [P, B]), // //# 04: continued - (e) => e is ArgumentError && e.invalidValue is List, // //# 04: continued - "Should throw an ArgumentError if number of type arguments is not " // //# 04: continued - "correct"); // //# 04: continued - Expect.throws(() => reflectType(B, [P]), (e) => e is Error, // //# 05: ok - "Should throw an ArgumentError for non-generic class extending " // //# 05: continued - "generic one"); // //# 05: continued + Expect.throws( // /// 04: ok + () => reflectType(A, [P, B]), // /// 04: continued + (e) => e is ArgumentError && e.invalidValue is List, // /// 04: continued + "Should throw an ArgumentError if number of type arguments is not " // /// 04: continued + "correct"); // /// 04: continued + Expect.throws(() => reflectType(B, [P]), (e) => e is Error, // /// 05: ok + "Should throw an ArgumentError for non-generic class extending " // /// 05: continued + "generic one"); // /// 05: continued Expect.throws( () => reflectType(A, ["non-type"]), (e) => e is ArgumentError && e.invalidValue is List, "Should throw an ArgumentError when any of type arguments is not a Type"); - Expect.throws( // //# 06: ok - () => reflectType(A, [P, B]), // //# 06: continued - (e) => e is ArgumentError && e.invalidValue is List, // //# 06: continued - "Should throw an ArgumentError if number of type arguments is not correct " //# 06: continued - "for generic extending another generic"); // //# 06: continued + Expect.throws( // /// 06: ok + () => reflectType(A, [P, B]), // /// 06: continued + (e) => e is ArgumentError && e.invalidValue is List, // /// 06: continued + "Should throw an ArgumentError if number of type arguments is not correct " /// 06: continued + "for generic extending another generic"); // /// 06: continued Expect.throws( () => reflectType(reflectType(F).typeVariables[0].reflectedType, [int])); - Expect.throws(() => reflectType(FBounded, [int])); //# 02: ok + Expect.throws(() => reflectType(FBounded, [int])); /// 02: ok var boundedType = reflectType(FBounded).typeVariables[0].upperBound.reflectedType; - Expect.throws(() => reflectType(boundedType, [int])); //# 02: ok - Expect.throws(() => reflectType(Composite, [int, int])); //# 02: ok + Expect.throws(() => reflectType(boundedType, [int])); /// 02: ok + Expect.throws(() => reflectType(Composite, [int, int])); /// 02: ok // Instantiation of a generic class preserves type information: ClassMirror m = reflectType(A, [P]) as ClassMirror; diff --git a/tests/lib/mirrors/reflected_type_test.dart b/tests/lib/mirrors/reflected_type_test.dart index beba03897b9..84e7468dc35 100644 --- a/tests/lib/mirrors/reflected_type_test.dart +++ b/tests/lib/mirrors/reflected_type_test.dart @@ -10,7 +10,7 @@ import 'package:expect/expect.dart'; class A {} class B extends A {} -class C extends A {} // //# 01: static type warning +class C extends A {} // /// 01: static type warning class D extends A {} class E extends A {} class F extends A {} @@ -43,7 +43,7 @@ main() { // Declarations. expectReflectedType(reflectClass(A), null); expectReflectedType(reflectClass(B), B); - expectReflectedType(reflectClass(C), C); // //# 01: continued + expectReflectedType(reflectClass(C), C); // /// 01: continued expectReflectedType(reflectClass(D), D); expectReflectedType(reflectClass(E), null); expectReflectedType(reflectClass(F), null); @@ -53,7 +53,7 @@ main() { // Instantiations. expectReflectedType(reflect(new A()).type, new A().runtimeType); expectReflectedType(reflect(new B()).type, new B().runtimeType); - expectReflectedType(reflect(new C()).type, new C().runtimeType); // //# 01: continued + expectReflectedType(reflect(new C()).type, new C().runtimeType); // /// 01: continued expectReflectedType(reflect(new D()).type, new D().runtimeType); expectReflectedType(reflect(new E()).type, new E().runtimeType); expectReflectedType(reflect(new F()).type, new F().runtimeType); @@ -61,12 +61,12 @@ main() { expectReflectedType(reflect(new H()).type, new H().runtimeType); expectReflectedType(reflect(new A()).type, new A().runtimeType); - expectReflectedType(reflect(new B()).type.superclass, // //# 02: static type warning - new A().runtimeType); // //# 02: continued - expectReflectedType(reflect(new C()).type.superclass, // //# 01: continued - new A().runtimeType); // //# 01: continued - expectReflectedType(reflect(new D()).type.superclass, // //# 03: static type warning - new A().runtimeType); // //# 03: continued + expectReflectedType(reflect(new B()).type.superclass, // /// 02: static type warning + new A().runtimeType); // /// 02: continued + expectReflectedType(reflect(new C()).type.superclass, // /// 01: continued + new A().runtimeType); // /// 01: continued + expectReflectedType(reflect(new D()).type.superclass, // /// 03: static type warning + new A().runtimeType); // /// 03: continued expectReflectedType(reflect(new E()).type, new E().runtimeType); expectReflectedType(reflect(new E()).type.superclass, new A().runtimeType); diff --git a/tests/lib/mirrors/regress_16321_test.dart b/tests/lib/mirrors/regress_16321_test.dart index 07769f734d2..73433bba9b6 100644 --- a/tests/lib/mirrors/regress_16321_test.dart +++ b/tests/lib/mirrors/regress_16321_test.dart @@ -12,7 +12,7 @@ class TypedBox { const TypedBox(this.contents); } -@TypedBox('foo') // //# 01: static type warning, checked mode compile-time error +@TypedBox('foo') // /// 01: static type warning, checked mode compile-time error @TypedBox(const ['foo']) class C {} diff --git a/tests/lib/mirrors/static_metatarget_test.dart b/tests/lib/mirrors/static_metatarget_test.dart index 8627ac493f1..fe40cae3fb0 100644 --- a/tests/lib/mirrors/static_metatarget_test.dart +++ b/tests/lib/mirrors/static_metatarget_test.dart @@ -9,11 +9,11 @@ import 'dart:mirrors'; class A { - @reflectable var reflectableField = 0; //# 01: ok + @reflectable var reflectableField = 0; /// 01: ok - @UsedOnlyAsMetadata() var unreflectableField = 1; //# 02: ok + @UsedOnlyAsMetadata() var unreflectableField = 1; /// 02: ok - @reflectable static var reflectableStaticField = 2; //# 03: ok + @reflectable static var reflectableStaticField = 2; /// 03: ok @UsedOnlyAsMetadata() static var unreflectableStaticField = 3; } diff --git a/tests/lib/mirrors/symbol_validation_test.dart b/tests/lib/mirrors/symbol_validation_test.dart index 1eef3398400..4026937435d 100644 --- a/tests/lib/mirrors/symbol_validation_test.dart +++ b/tests/lib/mirrors/symbol_validation_test.dart @@ -133,5 +133,5 @@ main() { '_', '_x', 'x._y', 'x._', 'x.y._', 'x._.y', '_true' ]; privateSymbols.forEach(invalidSymbol); - privateSymbols.forEach(validPrivateSymbol); // //# 01: ok + privateSymbols.forEach(validPrivateSymbol); // /// 01: ok } diff --git a/tests/lib/mirrors/syntax_error_test.dart b/tests/lib/mirrors/syntax_error_test.dart index 4f2ee09f08b..b9fb203898c 100644 --- a/tests/lib/mirrors/syntax_error_test.dart +++ b/tests/lib/mirrors/syntax_error_test.dart @@ -17,7 +17,7 @@ class A {} @MD(name:'B') class B { - static x = { 0: 0; }; // //# 01: compile-time error + static x = { 0: 0; }; // /// 01: compile-time error } main() { diff --git a/tests/lib/mirrors/type_variable_owner_test.dart b/tests/lib/mirrors/type_variable_owner_test.dart index a44bf9d9048..5b61831d0eb 100644 --- a/tests/lib/mirrors/type_variable_owner_test.dart +++ b/tests/lib/mirrors/type_variable_owner_test.dart @@ -50,5 +50,5 @@ testTypeVariableOfTypedef() { main() { testTypeVariableOfClass(); - testTypeVariableOfTypedef(); // //# 01: ok + testTypeVariableOfTypedef(); // /// 01: ok } diff --git a/tests/lib/mirrors/typedef_reflected_type_test.dart b/tests/lib/mirrors/typedef_reflected_type_test.dart index 9aca03aa99f..ea1bbb2eff6 100644 --- a/tests/lib/mirrors/typedef_reflected_type_test.dart +++ b/tests/lib/mirrors/typedef_reflected_type_test.dart @@ -21,9 +21,9 @@ main() { var m = reflectClass(C).declarations[#fun]; Expect.equals(Bar, m.returnType.reflectedType); - Expect.equals("Foo", m.parameters[0].type.reflectedType.toString()); // //# 01: ok - Expect.equals(int, m.parameters[0].type.typeArguments[0].reflectedType); // //# 01: continued - Expect.isFalse(m.parameters[0].type.isOriginalDeclaration); // //# 01: continued + Expect.equals("Foo", m.parameters[0].type.reflectedType.toString()); // /// 01: ok + Expect.equals(int, m.parameters[0].type.typeArguments[0].reflectedType); // /// 01: continued + Expect.isFalse(m.parameters[0].type.isOriginalDeclaration); // /// 01: continued var lib = currentMirrorSystem().findLibrary(#test); Expect.isTrue(lib.declarations[#Foo].isOriginalDeclaration); diff --git a/tests/lib/mirrors/variable_is_const_test.dart b/tests/lib/mirrors/variable_is_const_test.dart index bc76ed3800b..fc90fae9aa0 100644 --- a/tests/lib/mirrors/variable_is_const_test.dart +++ b/tests/lib/mirrors/variable_is_const_test.dart @@ -9,7 +9,7 @@ import 'dart:mirrors'; import 'package:expect/expect.dart'; class Class { - const //# 01: compile-time error + const /// 01: compile-time error int instanceWouldBeConst = 1; var instanceNonConst = 2; diff --git a/tests/lib_strong/convert/base64_test.dart b/tests/lib_strong/convert/base64_test.dart index 9e943273f7e..c942867c219 100644 --- a/tests/lib_strong/convert/base64_test.dart +++ b/tests/lib_strong/convert/base64_test.dart @@ -267,8 +267,8 @@ void testErrors() { badEncode(0x1000); badEncode(0x10000); // TODO(rnystrom): These aren't throwing in dev_compiler. Figure out why. - // badEncode(0x100000000); // //# 01: ok - // badEncode(0x10000000000000000); // //# 01: continued + // badEncode(0x100000000); // /// 01: ok + // badEncode(0x10000000000000000); // /// 01: continued } void testIssue25577() { diff --git a/tests/lib_strong/html/custom/document_register_basic_test.dart b/tests/lib_strong/html/custom/document_register_basic_test.dart index e1399bd0036..95b71f8f9e5 100644 --- a/tests/lib_strong/html/custom/document_register_basic_test.dart +++ b/tests/lib_strong/html/custom/document_register_basic_test.dart @@ -39,7 +39,7 @@ abstract class BadC extends HtmlElement { BadC.created() : super.created(); } -class BadF implements HtmlElement { //# compile-time error +class BadF implements HtmlElement { /// compile-time error static final tag = 'x-tag-f'; factory BadF() => new Element.tag(tag); } diff --git a/tests/lib_strong/html/custom/element_upgrade_test.dart b/tests/lib_strong/html/custom/element_upgrade_test.dart index 07b8194e58b..6fd9def1c19 100644 --- a/tests/lib_strong/html/custom/element_upgrade_test.dart +++ b/tests/lib_strong/html/custom/element_upgrade_test.dart @@ -71,7 +71,7 @@ main() { test('cannot upgrade interfaces', () { expect(() { - upgrader.upgrade(new HtmlElementInterface()); //# compile-time error + upgrader.upgrade(new HtmlElementInterface()); /// compile-time error }, throws); }); @@ -115,7 +115,7 @@ main() { }); } -class HtmlElementInterface implements HtmlElement { //# compile-time error +class HtmlElementInterface implements HtmlElement { /// compile-time error HtmlElementInterface.created(); } diff --git a/tests/lib_strong/html/js_typed_interop_default_arg_test.dart b/tests/lib_strong/html/js_typed_interop_default_arg_test.dart index 3a9a2c2482c..466df2c2d4e 100644 --- a/tests/lib_strong/html/js_typed_interop_default_arg_test.dart +++ b/tests/lib_strong/html/js_typed_interop_default_arg_test.dart @@ -25,7 +25,7 @@ _injectJs() { class Foo { // Note: it's invalid to provide a default value. external static num get42([num b - = 3 // //# default_value: compile-time error + = 3 // /// default_value: compile-time error ]); external static num get43([num b]); } @@ -40,14 +40,14 @@ main() { test('call tearoff from dart with arg', () { var f = Foo.get42; - expect(f(2), 2); //# explicit_argument: ok + expect(f(2), 2); /// explicit_argument: ok }); test('call tearoff from dart with default', () { var f = Foo.get42; // Note: today both SSA and CPS remove the extra argument on static calls, // but they fail to do so on tearoffs. - expect(f(), 3); //# default_value: continued + expect(f(), 3); /// default_value: continued f = Foo.get43; expect(f(), 43); diff --git a/tests/lib_strong/mirrors/abstract_class_test.dart b/tests/lib_strong/mirrors/abstract_class_test.dart index 30f3c278e94..00e108172df 100644 --- a/tests/lib_strong/mirrors/abstract_class_test.dart +++ b/tests/lib_strong/mirrors/abstract_class_test.dart @@ -130,7 +130,7 @@ abstract class NamedMA = S with M; class SubNamedMA extends NamedMA { mixinFoo() {} } -class ConcreteNamedMA = S with M; //# 00: static type warning +class ConcreteNamedMA = S with M; /// 00: static type warning abstract class NamedMA2 = S with M2; class SubNamedMA2 extends NamedMA2 { @@ -159,8 +159,8 @@ testNamedMixinApplication() { // Application is concrete. { // Mixin is abstract. - Expect.isFalse(reflectClass(ConcreteNamedMA).isAbstract); //# 00: ok - Expect.isFalse(reflectClass(ConcreteNamedMA).superclass.isAbstract); //# 00: ok + Expect.isFalse(reflectClass(ConcreteNamedMA).isAbstract); /// 00: ok + Expect.isFalse(reflectClass(ConcreteNamedMA).superclass.isAbstract); /// 00: ok // Mixin is concrete. Expect.isFalse(reflectClass(ConcreteNamedMA2).isAbstract); diff --git a/tests/lib_strong/mirrors/circular_factory_redirection_test.dart b/tests/lib_strong/mirrors/circular_factory_redirection_test.dart index 4823f55a5c8..997a319adfe 100644 --- a/tests/lib_strong/mirrors/circular_factory_redirection_test.dart +++ b/tests/lib_strong/mirrors/circular_factory_redirection_test.dart @@ -7,25 +7,25 @@ import "package:expect/expect.dart"; class A { A(); - A.circular() = B.circular; // //# 01: compile-time error - const A.circular2() = B.circular2; // //# 02: compile-time error + A.circular() = B.circular; // /// 01: compile-time error + const A.circular2() = B.circular2; // /// 02: compile-time error } class B { B(); - B.circular() = C.circular; // //# 01: continued - const B.circular2() = C.circular2; // //# 02: continued + B.circular() = C.circular; // /// 01: continued + const B.circular2() = C.circular2; // /// 02: continued } class C { C(); - C.circular() = A.circular; // //# 01: continued - const C.circular2() = A.circular2; // //# 02: continued + C.circular() = A.circular; // /// 01: continued + const C.circular2() = A.circular2; // /// 02: continued } main() { ClassMirror cm = reflectClass(A); - new A.circular(); // //# 01: continued - new A.circular2(); // //# 02: continued + new A.circular(); // /// 01: continued + new A.circular2(); // /// 02: continued Expect.throws(() => cm.newInstance(#circular, []), (e) => e is NoSuchMethodError, diff --git a/tests/lib_strong/mirrors/class_declarations_test.dart b/tests/lib_strong/mirrors/class_declarations_test.dart index 596f9c4e2ab..001309f6bc1 100644 --- a/tests/lib_strong/mirrors/class_declarations_test.dart +++ b/tests/lib_strong/mirrors/class_declarations_test.dart @@ -50,7 +50,7 @@ main() { 'setters'); // dart2js stops testing here. - return; // //# 01: ok + return; // /// 01: ok Expect.setEquals( ['Method(s(+) in s(Class))', diff --git a/tests/lib_strong/mirrors/constructor_kinds_test.dart b/tests/lib_strong/mirrors/constructor_kinds_test.dart index 488c86ce232..c7f45f8a793 100644 --- a/tests/lib_strong/mirrors/constructor_kinds_test.dart +++ b/tests/lib_strong/mirrors/constructor_kinds_test.dart @@ -32,14 +32,14 @@ main() { // that constructor properties are correctly set even if the constructor // hasn't been fully compiled. On dart2js, we want to check that constructors // are retain even if there are no base-level calls. - new ClassWithDefaultConstructor(); // //# 01: ok - new Class.generativeConstructor(); // //# 01: ok - new Class.redirectingGenerativeConstructor(); // //# 01: ok - new Class.factoryConstructor(); // //# 01: ok - new Class.redirectingFactoryConstructor(); // //# 01: ok - const Class.constGenerativeConstructor(); // //# 01: ok - const Class.constRedirectingGenerativeConstructor(); // //# 01: ok - const Class.constRedirectingFactoryConstructor(); // //# 01: ok + new ClassWithDefaultConstructor(); // /// 01: ok + new Class.generativeConstructor(); // /// 01: ok + new Class.redirectingGenerativeConstructor(); // /// 01: ok + new Class.factoryConstructor(); // /// 01: ok + new Class.redirectingFactoryConstructor(); // /// 01: ok + const Class.constGenerativeConstructor(); // /// 01: ok + const Class.constRedirectingGenerativeConstructor(); // /// 01: ok + const Class.constRedirectingFactoryConstructor(); // /// 01: ok cm = reflectClass(ClassWithDefaultConstructor); mm = cm.declarations.values diff --git a/tests/lib_strong/mirrors/generic_bounded_by_type_parameter_test.dart b/tests/lib_strong/mirrors/generic_bounded_by_type_parameter_test.dart index 388274a1de8..3b05fecf452 100644 --- a/tests/lib_strong/mirrors/generic_bounded_by_type_parameter_test.dart +++ b/tests/lib_strong/mirrors/generic_bounded_by_type_parameter_test.dart @@ -12,8 +12,8 @@ import 'generics_helper.dart'; class Super {} class Fixed extends Super {} -class Generic extends Super {} //# 02: static type warning -class Malbounded extends Super {} //# 01: static type warning +class Generic extends Super {} /// 02: static type warning +class Malbounded extends Super {} /// 01: static type warning bool inCheckedMode() { try { @@ -28,57 +28,57 @@ bool inCheckedMode() { main() { ClassMirror superDecl = reflectClass(Super); ClassMirror superOfNumAndInt = reflectClass(Fixed).superclass; - ClassMirror genericDecl = reflectClass(Generic); // //# 02: continued - ClassMirror superOfXAndY = genericDecl.superclass; // //# 02: continued - ClassMirror genericOfNumAndDouble = reflect(new Generic()).type; // //# 02: continued - ClassMirror superOfNumAndDouble = genericOfNumAndDouble.superclass; // //# 02: continued - ClassMirror superOfNumAndString = reflectClass(Malbounded).superclass; // //# 01: continued + ClassMirror genericDecl = reflectClass(Generic); // /// 02: continued + ClassMirror superOfXAndY = genericDecl.superclass; // /// 02: continued + ClassMirror genericOfNumAndDouble = reflect(new Generic()).type; // /// 02: continued + ClassMirror superOfNumAndDouble = genericOfNumAndDouble.superclass; // /// 02: continued + ClassMirror superOfNumAndString = reflectClass(Malbounded).superclass; // /// 01: continued try { - ClassMirror genericOfNumAndBool = reflect(new Generic()).type; // //# 02: static type warning - ClassMirror superOfNumAndBool = genericOfNumAndBool.superclass; // //# 02: continued - Expect.isFalse(genericOfNumAndBool.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfNumAndBool.isOriginalDeclaration); // //# 02: continued - typeParameters(genericOfNumAndBool, [#X, #Y]); // //# 02: continued - typeParameters(superOfNumAndBool, [#T, #R]); // //# 02: continued - typeArguments(genericOfNumAndBool, [reflectClass(num), reflectClass(bool)]); // //# 02: continued - typeArguments(superOfNumAndBool, [reflectClass(num), reflectClass(bool)]); // //# 02: continued - Expect.isFalse(inCheckedMode()); //# 02: continued + ClassMirror genericOfNumAndBool = reflect(new Generic()).type; // /// 02: static type warning + ClassMirror superOfNumAndBool = genericOfNumAndBool.superclass; // /// 02: continued + Expect.isFalse(genericOfNumAndBool.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfNumAndBool.isOriginalDeclaration); // /// 02: continued + typeParameters(genericOfNumAndBool, [#X, #Y]); // /// 02: continued + typeParameters(superOfNumAndBool, [#T, #R]); // /// 02: continued + typeArguments(genericOfNumAndBool, [reflectClass(num), reflectClass(bool)]); // /// 02: continued + typeArguments(superOfNumAndBool, [reflectClass(num), reflectClass(bool)]); // /// 02: continued + Expect.isFalse(inCheckedMode()); /// 02: continued } on TypeError catch(e) { Expect.isTrue(inCheckedMode()); } Expect.isTrue(superDecl.isOriginalDeclaration); Expect.isFalse(superOfNumAndInt.isOriginalDeclaration); - Expect.isTrue(genericDecl.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfXAndY.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(genericOfNumAndDouble.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfNumAndDouble.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfNumAndString.isOriginalDeclaration); // //# 01: continued + Expect.isTrue(genericDecl.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfXAndY.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(genericOfNumAndDouble.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfNumAndDouble.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfNumAndString.isOriginalDeclaration); // /// 01: continued TypeVariableMirror tFromSuper = superDecl.typeVariables[0]; TypeVariableMirror rFromSuper = superDecl.typeVariables[1]; - TypeVariableMirror xFromGeneric = genericDecl.typeVariables[0]; // //# 02: continued - TypeVariableMirror yFromGeneric = genericDecl.typeVariables[1]; // //# 02: continued + TypeVariableMirror xFromGeneric = genericDecl.typeVariables[0]; // /// 02: continued + TypeVariableMirror yFromGeneric = genericDecl.typeVariables[1]; // /// 02: continued Expect.equals(reflectClass(Object), tFromSuper.upperBound); Expect.equals(tFromSuper, rFromSuper.upperBound); - Expect.equals(reflectClass(Object), xFromGeneric.upperBound); // //# 02: continued - Expect.equals(reflectClass(Object), yFromGeneric.upperBound); // //# 02: continued + Expect.equals(reflectClass(Object), xFromGeneric.upperBound); // /// 02: continued + Expect.equals(reflectClass(Object), yFromGeneric.upperBound); // /// 02: continued typeParameters(superDecl, [#T, #R]); typeParameters(superOfNumAndInt, [#T, #R]); - typeParameters(genericDecl, [#X, #Y]); // //# 02: continued - typeParameters(superOfXAndY, [#T, #R]); // //# 02: continued - typeParameters(genericOfNumAndDouble, [#X, #Y]); // //# 02: continued - typeParameters(superOfNumAndDouble, [#T, #R]); // //# 02: continued - typeParameters(superOfNumAndString, [#T, #R]); // //# 01: continued + typeParameters(genericDecl, [#X, #Y]); // /// 02: continued + typeParameters(superOfXAndY, [#T, #R]); // /// 02: continued + typeParameters(genericOfNumAndDouble, [#X, #Y]); // /// 02: continued + typeParameters(superOfNumAndDouble, [#T, #R]); // /// 02: continued + typeParameters(superOfNumAndString, [#T, #R]); // /// 01: continued typeArguments(superDecl, []); typeArguments(superOfNumAndInt, [reflectClass(num), reflectClass(int)]); - typeArguments(genericDecl, []); // //# 02: continued - typeArguments(superOfXAndY, [xFromGeneric, yFromGeneric]); // //# 02: continued - typeArguments(genericOfNumAndDouble, [reflectClass(num), reflectClass(double)]); // //# 02: continued - typeArguments(superOfNumAndDouble, [reflectClass(num), reflectClass(double)]); // //# 02: continued - typeArguments(superOfNumAndString, [reflectClass(num), reflectClass(String)]); // //# 01: continued + typeArguments(genericDecl, []); // /// 02: continued + typeArguments(superOfXAndY, [xFromGeneric, yFromGeneric]); // /// 02: continued + typeArguments(genericOfNumAndDouble, [reflectClass(num), reflectClass(double)]); // /// 02: continued + typeArguments(superOfNumAndDouble, [reflectClass(num), reflectClass(double)]); // /// 02: continued + typeArguments(superOfNumAndString, [reflectClass(num), reflectClass(String)]); // /// 01: continued } diff --git a/tests/lib_strong/mirrors/generic_bounded_test.dart b/tests/lib_strong/mirrors/generic_bounded_test.dart index 5afc2283272..d581104acfd 100644 --- a/tests/lib_strong/mirrors/generic_bounded_test.dart +++ b/tests/lib_strong/mirrors/generic_bounded_test.dart @@ -13,8 +13,8 @@ import 'generics_helper.dart'; class Super {} class Fixed extends Super {} -class Generic extends Super {} // //# 02: static type warning -class Malbounded extends Super {} //# 01: static type warning +class Generic extends Super {} // /// 02: static type warning +class Malbounded extends Super {} /// 01: static type warning bool inCheckedMode() { try { @@ -29,55 +29,55 @@ bool inCheckedMode() { main() { ClassMirror superDecl = reflectClass(Super); ClassMirror superOfInt = reflectClass(Fixed).superclass; - ClassMirror genericDecl = reflectClass(Generic); // //# 02: continued - ClassMirror superOfR = genericDecl.superclass; // //# 02: continued - ClassMirror genericOfDouble = reflect(new Generic()).type; // //# 02: continued - ClassMirror superOfDouble = genericOfDouble.superclass; // //# 02: continued + ClassMirror genericDecl = reflectClass(Generic); // /// 02: continued + ClassMirror superOfR = genericDecl.superclass; // /// 02: continued + ClassMirror genericOfDouble = reflect(new Generic()).type; // /// 02: continued + ClassMirror superOfDouble = genericOfDouble.superclass; // /// 02: continued try { - ClassMirror genericOfBool = reflect(new Generic()).type; // //# 02: static type warning - ClassMirror superOfBool = genericOfBool.superclass; // //# 02: continued - Expect.isFalse(genericOfBool.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfBool.isOriginalDeclaration); // //# 02: continued - typeParameters(genericOfBool, [#R]); // //# 02: continued - typeParameters(superOfBool, [#T]); // //# 02: continued - typeArguments(genericOfBool, [reflectClass(bool)]); // //# 02: continued - typeArguments(superOfBool, [reflectClass(bool)]); // //# 02: continued - Expect.isFalse(inCheckedMode()); //# 02: continued + ClassMirror genericOfBool = reflect(new Generic()).type; // /// 02: static type warning + ClassMirror superOfBool = genericOfBool.superclass; // /// 02: continued + Expect.isFalse(genericOfBool.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfBool.isOriginalDeclaration); // /// 02: continued + typeParameters(genericOfBool, [#R]); // /// 02: continued + typeParameters(superOfBool, [#T]); // /// 02: continued + typeArguments(genericOfBool, [reflectClass(bool)]); // /// 02: continued + typeArguments(superOfBool, [reflectClass(bool)]); // /// 02: continued + Expect.isFalse(inCheckedMode()); /// 02: continued } on TypeError catch(e) { Expect.isTrue(inCheckedMode()); } - ClassMirror superOfString = reflectClass(Malbounded).superclass; // //# 01: continued + ClassMirror superOfString = reflectClass(Malbounded).superclass; // /// 01: continued Expect.isTrue(superDecl.isOriginalDeclaration); Expect.isFalse(superOfInt.isOriginalDeclaration); - Expect.isTrue(genericDecl.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfR.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(genericOfDouble.isOriginalDeclaration); // //# 02: continued - Expect.isFalse(superOfDouble.isOriginalDeclaration); // //# 02: continued + Expect.isTrue(genericDecl.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfR.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(genericOfDouble.isOriginalDeclaration); // /// 02: continued + Expect.isFalse(superOfDouble.isOriginalDeclaration); // /// 02: continued - Expect.isFalse(superOfString.isOriginalDeclaration); // //# 01: continued + Expect.isFalse(superOfString.isOriginalDeclaration); // /// 01: continued TypeVariableMirror tFromSuper = superDecl.typeVariables.single; - TypeVariableMirror rFromGeneric = genericDecl.typeVariables.single; // //# 02: continued + TypeVariableMirror rFromGeneric = genericDecl.typeVariables.single; // /// 02: continued Expect.equals(reflectClass(num), tFromSuper.upperBound); - Expect.equals(reflectClass(Object), rFromGeneric.upperBound); // //# 02: continued + Expect.equals(reflectClass(Object), rFromGeneric.upperBound); // /// 02: continued typeParameters(superDecl, [#T]); typeParameters(superOfInt, [#T]); - typeParameters(genericDecl, [#R]); // //# 02: continued - typeParameters(superOfR, [#T]); // //# 02: continued - typeParameters(genericOfDouble, [#R]); // //# 02: continued - typeParameters(superOfDouble, [#T]); // //# 02: continued - typeParameters(superOfString, [#T]); // //# 01: continued + typeParameters(genericDecl, [#R]); // /// 02: continued + typeParameters(superOfR, [#T]); // /// 02: continued + typeParameters(genericOfDouble, [#R]); // /// 02: continued + typeParameters(superOfDouble, [#T]); // /// 02: continued + typeParameters(superOfString, [#T]); // /// 01: continued typeArguments(superDecl, []); typeArguments(superOfInt, [reflectClass(int)]); - typeArguments(genericDecl, []); // //# 02: continued - typeArguments(superOfR, [rFromGeneric]); // //# 02: continued - typeArguments(genericOfDouble, [reflectClass(double)]); // //# 02: continued - typeArguments(superOfDouble, [reflectClass(double)]); // //# 02: continued - typeArguments(superOfString, [reflectClass(String)]); // //# 01: continued + typeArguments(genericDecl, []); // /// 02: continued + typeArguments(superOfR, [rFromGeneric]); // /// 02: continued + typeArguments(genericOfDouble, [reflectClass(double)]); // /// 02: continued + typeArguments(superOfDouble, [reflectClass(double)]); // /// 02: continued + typeArguments(superOfString, [reflectClass(String)]); // /// 01: continued } diff --git a/tests/lib_strong/mirrors/generic_f_bounded_test.dart b/tests/lib_strong/mirrors/generic_f_bounded_test.dart index 05a9fb895bb..bd368607301 100644 --- a/tests/lib_strong/mirrors/generic_f_bounded_test.dart +++ b/tests/lib_strong/mirrors/generic_f_bounded_test.dart @@ -52,7 +52,7 @@ main() { typeArguments(realDecl, []); typeArguments(sorterDecl, []); typeArguments(realSorterDecl, []); - typeArguments(magnitudeOfReal, [realDecl]); //# 01: ok - typeArguments(sorterOfReal, [realDecl]); //# 01: ok + typeArguments(magnitudeOfReal, [realDecl]); /// 01: ok + typeArguments(sorterOfReal, [realDecl]); /// 01: ok typeArguments(magnitudeOfR, [rFromSorter]); } diff --git a/tests/lib_strong/mirrors/generic_interface_test.dart b/tests/lib_strong/mirrors/generic_interface_test.dart index 0875a225155..a1266454b98 100644 --- a/tests/lib_strong/mirrors/generic_interface_test.dart +++ b/tests/lib_strong/mirrors/generic_interface_test.dart @@ -17,7 +17,7 @@ class Fixed implements Interface {} class Generic implements Interface {} class Bienbounded implements Bounded {} -class Malbounded implements Bounded {} // //# 01: static type warning +class Malbounded implements Bounded {} // /// 01: static type warning class FBounded implements Interface {} class Mixin {} @@ -37,7 +37,7 @@ main() { ClassMirror interfaceOfBool = reflect(new Generic()).type.superinterfaces.single; ClassMirror boundedOfInt = reflectClass(Bienbounded).superinterfaces.single; - ClassMirror boundedOfString = reflectClass(Malbounded).superinterfaces.single; // //# 01: continued + ClassMirror boundedOfString = reflectClass(Malbounded).superinterfaces.single; // /// 01: continued ClassMirror interfaceOfFBounded = reflectClass(FBounded).superinterfaces.single; ClassMirror interfaceOfInt2 = reflectClass(FixedMixinApplication).superinterfaces.single; @@ -55,7 +55,7 @@ main() { Expect.isFalse(interfaceOfR.isOriginalDeclaration); Expect.isFalse(interfaceOfBool.isOriginalDeclaration); Expect.isFalse(boundedOfInt.isOriginalDeclaration); - Expect.isFalse(boundedOfString.isOriginalDeclaration); // //# 01: continued + Expect.isFalse(boundedOfString.isOriginalDeclaration); // /// 01: continued Expect.isFalse(interfaceOfFBounded.isOriginalDeclaration); Expect.isFalse(interfaceOfInt2.isOriginalDeclaration); Expect.isFalse(interfaceOfX.isOriginalDeclaration); @@ -84,7 +84,7 @@ main() { typeParameters(interfaceOfR, [#T]); typeParameters(interfaceOfBool, [#T]); typeParameters(boundedOfInt, [#S]); - typeParameters(boundedOfString, [#S]); // //# 01: continued + typeParameters(boundedOfString, [#S]); // /// 01: continued typeParameters(interfaceOfFBounded, [#T]); typeParameters(interfaceOfInt2, [#T]); typeParameters(interfaceOfX, [#T]); @@ -99,7 +99,7 @@ main() { typeArguments(interfaceOfR, [rFromGeneric]); typeArguments(interfaceOfBool, [reflectClass(bool)]); typeArguments(boundedOfInt, [reflectClass(int)]); - typeArguments(boundedOfString, [reflectClass(String)]); // //# 01: continued + typeArguments(boundedOfString, [reflectClass(String)]); // /// 01: continued typeArguments(interfaceOfFBounded, [reflectClass(FBounded)]); typeArguments(interfaceOfInt2, [reflectClass(int)]); typeArguments(interfaceOfX, [xFromGenericMixinApplication]); diff --git a/tests/lib_strong/mirrors/generic_superclass_test.dart b/tests/lib_strong/mirrors/generic_superclass_test.dart index a0a7e03ba5f..ebf4c8cf96b 100644 --- a/tests/lib_strong/mirrors/generic_superclass_test.dart +++ b/tests/lib_strong/mirrors/generic_superclass_test.dart @@ -52,9 +52,9 @@ void testOriginals() { Expect.equals(reflectClass(Object), superA); Expect.equals(reflect(new A()).type, superB); - Expect.equals(reflect(new A()).type, superC); //# 01: ok + Expect.equals(reflect(new A()).type, superC); /// 01: ok Expect.equals(reflect(new U()).type, superB.typeArguments[0]); - Expect.equals(reflect(new C()).type, superC.typeArguments[0]); //# 01: ok + Expect.equals(reflect(new C()).type, superC.typeArguments[0]); /// 01: ok Expect.equals(dT, superD.typeArguments[0]); Expect.equals(eY, superE.typeArguments[0].typeArguments[0]); Expect.equals(feY, superInterfaceFF.typeArguments[0].typeArguments[0]); @@ -94,13 +94,13 @@ void testInstances() { Expect.equals(reflectClass(Object), superA); Expect.equals(reflect(new A()).type, superB); - Expect.equals(reflect(new A()).type, superC); //# 01: ok + Expect.equals(reflect(new A()).type, superC); /// 01: ok Expect.equals(reflect(new A()).type, superD); Expect.equals(reflect(new G>()).type, superE); Expect.equals(reflect(new G>>()).type, superE0); Expect.equals(reflect(new G>()).type, superInterfaceFF); Expect.equals(u, superB.typeArguments[0]); - Expect.equals(reflect(new C()).type, superC.typeArguments[0]); //# 01: ok + Expect.equals(reflect(new C()).type, superC.typeArguments[0]); /// 01: ok Expect.equals(u, superD.typeArguments[0]); Expect.equals(r, superE.typeArguments[0].typeArguments[0]); Expect.equals(hr, superE0.typeArguments[0].typeArguments[0]); diff --git a/tests/lib_strong/mirrors/generics_double_substitution_test.dart b/tests/lib_strong/mirrors/generics_double_substitution_test.dart index ea3f5bc14d8..5eae4e6a1aa 100644 --- a/tests/lib_strong/mirrors/generics_double_substitution_test.dart +++ b/tests/lib_strong/mirrors/generics_double_substitution_test.dart @@ -29,5 +29,5 @@ main() { Expect.equals(aOfString, parameterType.parameters.single.type); ClassMirror typeArgOfSuperclass = cOfString.superclass.typeArguments.single; - Expect.equals(aOfString, typeArgOfSuperclass); // //# 01: ok + Expect.equals(aOfString, typeArgOfSuperclass); // /// 01: ok } diff --git a/tests/lib_strong/mirrors/generics_test.dart b/tests/lib_strong/mirrors/generics_test.dart index 4abe39c3299..fd9b105b2ab 100644 --- a/tests/lib_strong/mirrors/generics_test.dart +++ b/tests/lib_strong/mirrors/generics_test.dart @@ -13,7 +13,7 @@ class A {} class Z {} class B extends A {} class C - extends A // //# 01: static type warning + extends A // /// 01: static type warning {} class D extends A {} class E extends A {} diff --git a/tests/lib_strong/mirrors/get_field_static_test.dart b/tests/lib_strong/mirrors/get_field_static_test.dart index 4914cb90170..2a42aa1ae27 100644 --- a/tests/lib_strong/mirrors/get_field_static_test.dart +++ b/tests/lib_strong/mirrors/get_field_static_test.dart @@ -26,6 +26,6 @@ main() { Expect.equals(499, cm.getField(#bar).reflectee); Expect.equals(42, cm.getField(#x).reflectee); - Expect.equals("toto", cm.getField(#y).reflectee); // //# 00: ok - Expect.equals(true, cm.getField(#z).reflectee); // //# 00: ok + Expect.equals("toto", cm.getField(#y).reflectee); // /// 00: ok + Expect.equals(true, cm.getField(#z).reflectee); // /// 00: ok } diff --git a/tests/lib_strong/mirrors/globalized_closures2_test.dart b/tests/lib_strong/mirrors/globalized_closures2_test.dart index 0ef541c6ec7..b842b6ea5ab 100644 --- a/tests/lib_strong/mirrors/globalized_closures2_test.dart +++ b/tests/lib_strong/mirrors/globalized_closures2_test.dart @@ -33,5 +33,5 @@ main() { collectedParents.add(MirrorSystem.getName(c.superclass.simpleName)); } }; - Expect.isTrue(collectedParents.isEmpty); // //# 00: ok + Expect.isTrue(collectedParents.isEmpty); // /// 00: ok } diff --git a/tests/lib_strong/mirrors/globalized_closures_test.dart b/tests/lib_strong/mirrors/globalized_closures_test.dart index 7705f4c8109..80b9a1fa140 100644 --- a/tests/lib_strong/mirrors/globalized_closures_test.dart +++ b/tests/lib_strong/mirrors/globalized_closures_test.dart @@ -33,5 +33,5 @@ main() { collectedParents.add(MirrorSystem.getName(c.superclass.simpleName)); } }; - Expect.listEquals(["Object"], collectedParents); // //# 00: ok + Expect.listEquals(["Object"], collectedParents); // /// 00: ok } diff --git a/tests/lib_strong/mirrors/initializing_formals_test.dart b/tests/lib_strong/mirrors/initializing_formals_test.dart index d052b76bf52..4ebb0923180 100644 --- a/tests/lib_strong/mirrors/initializing_formals_test.dart +++ b/tests/lib_strong/mirrors/initializing_formals_test.dart @@ -39,10 +39,10 @@ main() { pm = mm.parameters.single; Expect.equals(#intField, pm.simpleName); Expect.equals(reflectClass(int), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -51,10 +51,10 @@ main() { pm = mm.parameters.single; Expect.equals(#boolField, pm.simpleName); Expect.equals(reflectClass(bool), pm.type); - Expect.isTrue(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isTrue(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isTrue(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isTrue(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -63,11 +63,11 @@ main() { pm = mm.parameters.single; Expect.equals(#stringField, pm.simpleName); Expect.equals(reflectClass(String), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isTrue(pm.isOptional); // //# 01: ok - Expect.isTrue(pm.hasDefaultValue); // //# 01: ok - Expect.equals('default', pm.defaultValue.reflectee); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isTrue(pm.isOptional); // /// 01: ok + Expect.isTrue(pm.hasDefaultValue); // /// 01: ok + Expect.equals('default', pm.defaultValue.reflectee); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -76,22 +76,22 @@ main() { pm = mm.parameters.single; Expect.equals(#tField, pm.simpleName); Expect.equals(reflectClass(Class).typeVariables.single, pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); mm = reflectClass(Class).declarations[#Class.private]; pm = mm.parameters.single; - Expect.equals(#_privateField, pm.simpleName); // //# 03: ok + Expect.equals(#_privateField, pm.simpleName); // /// 03: ok Expect.equals(currentMirrorSystem().dynamicType, pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isTrue(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -100,10 +100,10 @@ main() { pm = mm.parameters.single; Expect.equals(#intField, pm.simpleName); Expect.equals(reflectClass(num), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -112,10 +112,10 @@ main() { pm = mm.parameters.single; Expect.equals(#intField, pm.simpleName); Expect.equals(reflectClass(int), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -124,10 +124,10 @@ main() { pm = mm.parameters.single; Expect.equals(#intField, pm.simpleName); Expect.equals(currentMirrorSystem().dynamicType, pm.type); // N.B. - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -136,10 +136,10 @@ main() { pm = mm.parameters.single; Expect.equals(#value, pm.simpleName); Expect.equals(reflectClass(num), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isFalse(pm.isFinal); // N.B. // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isFalse(pm.isFinal); // N.B. // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); @@ -148,10 +148,10 @@ main() { pm = mm.parameters.single; Expect.equals(#value, pm.simpleName); Expect.equals(reflectClass(num), pm.type); - Expect.isFalse(pm.isNamed); // //# 01: ok - Expect.isTrue(pm.isFinal); // N.B. // //# 01: ok - Expect.isFalse(pm.isOptional); // //# 01: ok - Expect.isFalse(pm.hasDefaultValue); // //# 01: ok + Expect.isFalse(pm.isNamed); // /// 01: ok + Expect.isTrue(pm.isFinal); // N.B. // /// 01: ok + Expect.isFalse(pm.isOptional); // /// 01: ok + Expect.isFalse(pm.hasDefaultValue); // /// 01: ok Expect.isFalse(pm.isPrivate); Expect.isFalse(pm.isStatic); Expect.isFalse(pm.isTopLevel); diff --git a/tests/lib_strong/mirrors/invocation_fuzz_test.dart b/tests/lib_strong/mirrors/invocation_fuzz_test.dart index d5f9ca96d73..ed3cb27747b 100644 --- a/tests/lib_strong/mirrors/invocation_fuzz_test.dart +++ b/tests/lib_strong/mirrors/invocation_fuzz_test.dart @@ -164,10 +164,10 @@ var fuzzArgument; main() { fuzzArgument = null; - fuzzArgument = 1; // //# smi: ok - fuzzArgument = false; // //# false: ok - fuzzArgument = 'string'; // //# string: ok - fuzzArgument = new List(0); // //# emptyarray: ok + fuzzArgument = 1; // /// smi: ok + fuzzArgument = false; // /// false: ok + fuzzArgument = 'string'; // /// string: ok + fuzzArgument = new List(0); // /// emptyarray: ok print('Fuzzing with $fuzzArgument'); diff --git a/tests/lib_strong/mirrors/invoke_call_through_getter_previously_accessed_test.dart b/tests/lib_strong/mirrors/invoke_call_through_getter_previously_accessed_test.dart index 257660d98db..14a3157a341 100644 --- a/tests/lib_strong/mirrors/invoke_call_through_getter_previously_accessed_test.dart +++ b/tests/lib_strong/mirrors/invoke_call_through_getter_previously_accessed_test.dart @@ -51,8 +51,8 @@ testInstanceReflective() { im.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 C 11 12 13 null', im.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 C 14 15 null 16', // //# named: ok - im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 C 14 15 null 16', // /// named: ok + im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.equals('DNU', im.invoke(#doesNotExist, [17, 18]).reflectee); Expect.throws(() => im.invoke(#closure, ['wrong arity']), @@ -90,8 +90,8 @@ testClassReflective() { cm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', cm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => cm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } @@ -123,8 +123,8 @@ testLibraryReflective() { lm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', lm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => lm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } diff --git a/tests/lib_strong/mirrors/invoke_call_through_getter_test.dart b/tests/lib_strong/mirrors/invoke_call_through_getter_test.dart index 72e6b6c8583..80a1fdedc4d 100644 --- a/tests/lib_strong/mirrors/invoke_call_through_getter_test.dart +++ b/tests/lib_strong/mirrors/invoke_call_through_getter_test.dart @@ -51,8 +51,8 @@ testInstanceReflective() { im.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 C 11 12 13 null', im.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 C 14 15 null 16', // //# named: ok - im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 C 14 15 null 16', // /// named: ok + im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.equals('DNU', im.invoke(#doesNotExist, [17, 18]).reflectee); Expect.throws(() => im.invoke(#closure, ['wrong arity']), @@ -90,8 +90,8 @@ testClassReflective() { cm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', cm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => cm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } @@ -123,8 +123,8 @@ testLibraryReflective() { lm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', lm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => lm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } diff --git a/tests/lib_strong/mirrors/invoke_call_through_implicit_getter_previously_accessed_test.dart b/tests/lib_strong/mirrors/invoke_call_through_implicit_getter_previously_accessed_test.dart index c020124f57f..f9866a593db 100644 --- a/tests/lib_strong/mirrors/invoke_call_through_implicit_getter_previously_accessed_test.dart +++ b/tests/lib_strong/mirrors/invoke_call_through_implicit_getter_previously_accessed_test.dart @@ -57,8 +57,8 @@ testInstanceReflective() { im.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 C 11 12 13 null', im.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 C 14 15 null 16', // //# named: ok - im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 C 14 15 null 16', // /// named: ok + im.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.equals('DNU', im.invoke(#doesNotExist, [17, 18]).reflectee); Expect.throws(() => im.invoke(#closure, ['wrong arity']), @@ -96,8 +96,8 @@ testClassReflective() { cm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', cm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + cm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => cm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } @@ -129,8 +129,8 @@ testLibraryReflective() { lm.invoke(#closure, [9, 10]).reflectee); Expect.equals('3 11 12 13 null', lm.invoke(#closureOpt, [11, 12, 13]).reflectee); - Expect.equals('4 14 15 null 16', // //# named: continued - lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // //# named: continued + Expect.equals('4 14 15 null 16', // /// named: continued + lm.invoke(#closureNamed, [14, 15], {#w: 16}).reflectee); // /// named: continued Expect.throws(() => lm.invoke(#closure, ['wrong arity']), (e) => e is NoSuchMethodError); } diff --git a/tests/lib_strong/mirrors/invoke_named_test.dart b/tests/lib_strong/mirrors/invoke_named_test.dart index 50e8be5d4f2..feee0ab1a4c 100644 --- a/tests/lib_strong/mirrors/invoke_named_test.dart +++ b/tests/lib_strong/mirrors/invoke_named_test.dart @@ -281,7 +281,7 @@ testSyncApply() { } main() { - isDart2js = true; //# 01: ok + isDart2js = true; /// 01: ok testSyncInvoke(reflect(new C())); // InstanceMirror diff --git a/tests/lib_strong/mirrors/library_declarations_test.dart b/tests/lib_strong/mirrors/library_declarations_test.dart index 1e597931200..5e78a217cf3 100644 --- a/tests/lib_strong/mirrors/library_declarations_test.dart +++ b/tests/lib_strong/mirrors/library_declarations_test.dart @@ -23,7 +23,7 @@ main() { 'variables'); // dart2js stops testing here. - return; // //# 01: ok + return; // /// 01: ok Expect.setEquals( ['Method(s(_libraryGetter)' diff --git a/tests/lib_strong/mirrors/library_imports_bad_metadata_test.dart b/tests/lib_strong/mirrors/library_imports_bad_metadata_test.dart index 43d873bab70..82069465bf7 100644 --- a/tests/lib_strong/mirrors/library_imports_bad_metadata_test.dart +++ b/tests/lib_strong/mirrors/library_imports_bad_metadata_test.dart @@ -4,7 +4,7 @@ library test.library_imports_bad_metadata; -@undefined // //# 01: compile-time error +@undefined // /// 01: compile-time error import 'dart:mirrors'; import 'package:expect/expect.dart'; diff --git a/tests/lib_strong/mirrors/library_metadata2_test.dart b/tests/lib_strong/mirrors/library_metadata2_test.dart index c149cf3af54..8c4000cc58d 100644 --- a/tests/lib_strong/mirrors/library_metadata2_test.dart +++ b/tests/lib_strong/mirrors/library_metadata2_test.dart @@ -6,7 +6,7 @@ import 'dart:mirrors'; import 'library_metadata2_lib1.dart'; -import 'library_metadata2_lib2.dart'; //# 01: compile-time error +import 'library_metadata2_lib2.dart'; /// 01: compile-time error void main() { for (var library in currentMirrorSystem().libraries.values) { diff --git a/tests/lib_strong/mirrors/list_constructor_test.dart b/tests/lib_strong/mirrors/list_constructor_test.dart index 87125c5caad..c25d038ac9d 100644 --- a/tests/lib_strong/mirrors/list_constructor_test.dart +++ b/tests/lib_strong/mirrors/list_constructor_test.dart @@ -18,7 +18,7 @@ main() { list[0] = 1; Expect.equals(1, list[0]); - testGrowableList(); //# 01: ok + testGrowableList(); /// 01: ok } testGrowableList() { diff --git a/tests/lib_strong/mirrors/metadata_allowed_values_test.dart b/tests/lib_strong/mirrors/metadata_allowed_values_test.dart index b929f639444..92c43f576f9 100644 --- a/tests/lib_strong/mirrors/metadata_allowed_values_test.dart +++ b/tests/lib_strong/mirrors/metadata_allowed_values_test.dart @@ -10,7 +10,7 @@ import 'package:expect/expect.dart'; import 'metadata_allowed_values_import.dart'; // Unprefixed. import 'metadata_allowed_values_import.dart' as prefix; -@A // //# 01: compile-time error +@A // /// 01: compile-time error class A {} @B.CONSTANT @@ -30,43 +30,43 @@ class D { const D.named(this.field); } -@E.NOT_CONSTANT // //# 02: compile-time error +@E.NOT_CONSTANT // /// 02: compile-time error class E { static var NOT_CONSTANT = 3; } -@F(6) // //# 03: compile-time error +@F(6) // /// 03: compile-time error class F { final field; F(this.field); } -@G.named(4) // //# 04: compile-time error +@G.named(4) // /// 04: compile-time error class G { final field; G.named(this.field); } -@H() // //# 05: compile-time error +@H() // /// 05: compile-time error class H { const H(); } -@I[0] // //# 06: compile-time error +@I[0] // /// 06: compile-time error class I {} -@this.toString // //# 07: compile-time error +@this.toString // /// 07: compile-time error class J {} -@super.toString // //# 08: compile-time error +@super.toString // /// 08: compile-time error class K {} -@L.func() // //# 09: compile-time error +@L.func() // /// 09: compile-time error class L { static func() => 6; } -@Imported // //# 10: compile-time error +@Imported // /// 10: compile-time error class M {} @Imported() @@ -78,7 +78,7 @@ class O {} @Imported.CONSTANT class P {} -@prefix.Imported // //# 11: compile-time error +@prefix.Imported // /// 11: compile-time error class Q {} @prefix.Imported() @@ -90,84 +90,84 @@ class S {} @prefix.Imported.CONSTANT class T {} -@U..toString() // //# 12: compile-time error +@U..toString() // /// 12: compile-time error class U {} -@V.tearOff // //# 13: compile-time error +@V.tearOff // /// 13: compile-time error class V { static tearOff() {} } topLevelTearOff() => 4; -@topLevelTearOff // //# 14: compile-time error +@topLevelTearOff // /// 14: compile-time error class W {} -@TypeParameter // //# 15: compile-time error +@TypeParameter // /// 15: compile-time error class X {} -@TypeParameter.member // //# 16: compile-time error +@TypeParameter.member // /// 16: compile-time error class Y {} -@1 // //# 17: compile-time error +@1 // /// 17: compile-time error class Z {} -@3.14 // //# 18: compile-time error +@3.14 // /// 18: compile-time error class AA {} -@'string' // //# 19: compile-time error +@'string' // /// 19: compile-time error class BB {} -@#symbol // //# 20: compile-time error +@#symbol // /// 20: compile-time error class CC {} -@['element'] // //# 21: compile-time error +@['element'] // /// 21: compile-time error class DD {} -@{'key': 'value'} // //# 22: compile-time error +@{'key': 'value'} // /// 22: compile-time error class EE {} -@true // //# 23: compile-time error +@true // /// 23: compile-time error class FF {} -@false // //# 24: compile-time error +@false // /// 24: compile-time error class GG {} -@null // //# 25: compile-time error +@null // /// 25: compile-time error class HH {} const a = const [1, 2, 3]; @a class II {} -@a[0] // //# 26: compile-time error +@a[0] // /// 26: compile-time error class JJ {} -@kk // //# 27: compile-time error +@kk // /// 27: compile-time error class KK { const KK(); } get kk => const KK(); -@LL(() => 42) // //# 28: compile-time error +@LL(() => 42) // /// 28: compile-time error class LL { final field; const LL(this.field); } -@MM((x) => 42) // //# 29: compile-time error +@MM((x) => 42) // /// 29: compile-time error class MM { final field; const MM(this.field); } -@NN(() {}) // //# 30: compile-time error +@NN(() {}) // /// 30: compile-time error class NN { final field; const NN(this.field); } -@OO(() { () {} }) // //# 31: compile-time error +@OO(() { () {} }) // /// 31: compile-time error class OO { final field; const OO(this.field); diff --git a/tests/lib_strong/mirrors/metadata_constructor_arguments_test.dart b/tests/lib_strong/mirrors/metadata_constructor_arguments_test.dart index bc459e911ae..a957eb8f70f 100644 --- a/tests/lib_strong/mirrors/metadata_constructor_arguments_test.dart +++ b/tests/lib_strong/mirrors/metadata_constructor_arguments_test.dart @@ -15,7 +15,7 @@ class Tag { const Tag({named}) : this.name = named; } -@Tag(named: undefined) // //# 01: compile-time error +@Tag(named: undefined) // /// 01: compile-time error class A {} @Tag(named: 'valid') @@ -26,32 +26,32 @@ class C { static const STATIC_FIELD = 3; } -@Tag(named: D.instanceMethod()) // //# 02: compile-time error +@Tag(named: D.instanceMethod()) // /// 02: compile-time error class D { instanceMethod() {} } -@Tag(named: instanceField) // //# 03: compile-time error +@Tag(named: instanceField) // /// 03: compile-time error class E { var instanceField; } -@Tag(named: F.nonConstStaticField) // //# 04: compile-time error +@Tag(named: F.nonConstStaticField) // /// 04: compile-time error class F { static var nonConstStaticField = 6; } -@Tag(named: instanceMethod) // //# 05: compile-time error +@Tag(named: instanceMethod) // /// 05: compile-time error class G { instanceMethod() {} } -@Tag(named: this) // //# 06: compile-time error +@Tag(named: this) // /// 06: compile-time error class H { instanceMethod() {} } -@Tag(named: super) // //# 07: compile-time error +@Tag(named: super) // /// 07: compile-time error class I { instanceMethod() {} } diff --git a/tests/lib_strong/mirrors/metadata_nested_constructor_call_test.dart b/tests/lib_strong/mirrors/metadata_nested_constructor_call_test.dart index 483bb1699df..d3662269eaf 100644 --- a/tests/lib_strong/mirrors/metadata_nested_constructor_call_test.dart +++ b/tests/lib_strong/mirrors/metadata_nested_constructor_call_test.dart @@ -29,33 +29,33 @@ class B {} @Box(const Box(const Box())) class C {} -@Box(const Box(const MutableBox())) // //# 01: compile-time error +@Box(const Box(const MutableBox())) // /// 01: compile-time error class D {} -@Box(const MutableBox(const Box())) // //# 02: compile-time error +@Box(const MutableBox(const Box())) // /// 02: compile-time error class E {} -@Box(Box()) // //# 03: compile-time error +@Box(Box()) // /// 03: compile-time error class F {} -@Box(Box(const Box())) // //# 04: compile-time error +@Box(Box(const Box())) // /// 04: compile-time error class G {} -@Box(Box(const MutableBox())) // //# 05: compile-time error +@Box(Box(const MutableBox())) // /// 05: compile-time error class H {} -@Box(MutableBox(const Box())) // //# 06: compile-time error +@Box(MutableBox(const Box())) // /// 06: compile-time error class I {} final closure = () => 42; -@Box(closure()) // //# 07: compile-time error +@Box(closure()) // /// 07: compile-time error class J {} -@Box(closure) // //# 08: compile-time error +@Box(closure) // /// 08: compile-time error class K {} function() => 42; -@Box(function()) // //# 09: compile-time error +@Box(function()) // /// 09: compile-time error class L {} // N.B. This is legal, but @function is not (tested by metadata_allowed_values). diff --git a/tests/lib_strong/mirrors/metadata_scope_test.dart b/tests/lib_strong/mirrors/metadata_scope_test.dart index 6f20ea1ab76..6f4a050dad3 100644 --- a/tests/lib_strong/mirrors/metadata_scope_test.dart +++ b/tests/lib_strong/mirrors/metadata_scope_test.dart @@ -15,7 +15,7 @@ class Annotation { // Note there is no compile-time constant 'foo' in scope. In particular, A.foo // is not in scope here. -@Annotation(foo) // //# 01: compile-time error +@Annotation(foo) // /// 01: compile-time error class A <@Annotation(foo) T> { @Annotation(foo) static foo() {} diff --git a/tests/lib_strong/mirrors/mirror_in_static_init_test.dart b/tests/lib_strong/mirrors/mirror_in_static_init_test.dart index 6124d9f885f..471675e38ce 100644 --- a/tests/lib_strong/mirrors/mirror_in_static_init_test.dart +++ b/tests/lib_strong/mirrors/mirror_in_static_init_test.dart @@ -14,7 +14,7 @@ import 'dart:mirrors'; abstract class C { int _a; // This is a syntax error on purpose. - C([this._a: 0]); //# 01: compile-time error + C([this._a: 0]); /// 01: compile-time error } final int staticField = () { diff --git a/tests/lib_strong/mirrors/mirrors_nsm_test.dart b/tests/lib_strong/mirrors/mirrors_nsm_test.dart index b236e79ae75..2364f925b18 100644 --- a/tests/lib_strong/mirrors/mirrors_nsm_test.dart +++ b/tests/lib_strong/mirrors/mirrors_nsm_test.dart @@ -116,5 +116,5 @@ testMatchingMessages() { main() { testMessageContents(); - testMatchingMessages(); //# dart2js: ok + testMatchingMessages(); /// dart2js: ok } \ No newline at end of file diff --git a/tests/lib_strong/mirrors/mirrors_used_typedef_declaration_test.dart b/tests/lib_strong/mirrors/mirrors_used_typedef_declaration_test.dart index aa616e228d7..1c3b53c2cd7 100644 --- a/tests/lib_strong/mirrors/mirrors_used_typedef_declaration_test.dart +++ b/tests/lib_strong/mirrors/mirrors_used_typedef_declaration_test.dart @@ -23,7 +23,7 @@ main() { // The following code does not currenty work on the VM, because it does not // support MirrorsUsed (see dartbug.com/16048). - Mirror barMirror = thisLibrary.declarations[#Bar]; // //# 01: ok - Expect.isTrue(barMirror == null, // //# 01: continued - 'Bar should not be emitted due to MirrorsUsed.'); //# 01: continued + Mirror barMirror = thisLibrary.declarations[#Bar]; // /// 01: ok + Expect.isTrue(barMirror == null, // /// 01: continued + 'Bar should not be emitted due to MirrorsUsed.'); /// 01: continued } diff --git a/tests/lib_strong/mirrors/parameter_is_const_test.dart b/tests/lib_strong/mirrors/parameter_is_const_test.dart index 63696e3e590..45185a9b88d 100644 --- a/tests/lib_strong/mirrors/parameter_is_const_test.dart +++ b/tests/lib_strong/mirrors/parameter_is_const_test.dart @@ -10,7 +10,7 @@ import 'package:expect/expect.dart'; class Class { foo( - const //# 01: compile-time error + const /// 01: compile-time error param) {} } diff --git a/tests/lib_strong/mirrors/parameter_test.dart b/tests/lib_strong/mirrors/parameter_test.dart index dd60eb59423..0bd649b59c4 100644 --- a/tests/lib_strong/mirrors/parameter_test.dart +++ b/tests/lib_strong/mirrors/parameter_test.dart @@ -79,7 +79,7 @@ main() { barConstructor.returnType); // dart2js stops testing here. - return; // //# 01: ok + return; // /// 01: ok MethodMirror bazConstructor = constructors[#B.baz]; expect('Method(s(B.baz) in s(B), constructor)', bazConstructor); diff --git a/tests/lib_strong/mirrors/raw_type_test.dart b/tests/lib_strong/mirrors/raw_type_test.dart index 911a8afec29..d57e48660e5 100644 --- a/tests/lib_strong/mirrors/raw_type_test.dart +++ b/tests/lib_strong/mirrors/raw_type_test.dart @@ -18,5 +18,5 @@ main() { var barSupertype = reflect(new Bar()).type.superclass; var barSuperclass = barSupertype.originalDeclaration; Expect.equals(fooDeclaration, barSuperclass, 'declarations'); - Expect.equals(fooType, barSupertype, 'types'); //# 01: ok + Expect.equals(fooType, barSupertype, 'types'); /// 01: ok } diff --git a/tests/lib_strong/mirrors/redirecting_factory_different_type_test.dart b/tests/lib_strong/mirrors/redirecting_factory_different_type_test.dart index 126198718e8..6a6742efd79 100644 --- a/tests/lib_strong/mirrors/redirecting_factory_different_type_test.dart +++ b/tests/lib_strong/mirrors/redirecting_factory_different_type_test.dart @@ -11,7 +11,7 @@ import 'package:expect/expect.dart'; class A { factory A( - String // //# 01: static type warning + String // /// 01: static type warning x) = B; A._(); } diff --git a/tests/lib_strong/mirrors/redirecting_factory_test.dart b/tests/lib_strong/mirrors/redirecting_factory_test.dart index 1bf784c417c..b6112858f42 100644 --- a/tests/lib_strong/mirrors/redirecting_factory_test.dart +++ b/tests/lib_strong/mirrors/redirecting_factory_test.dart @@ -43,7 +43,7 @@ class Class { factory Class.redirectingFactoryStringTypeParameters(a, b) = Class - // //# 02: static type warning + // /// 02: static type warning .factoryNoOptional; factory Class.redirectingFactoryTypeParameters(a, b) = @@ -85,7 +85,7 @@ main() { Expect.isTrue(instanceMirror.reflectee is Class); bool isDart2js = false; - isDart2js = true; //# 01: ok + isDart2js = true; /// 01: ok if (isDart2js) return; instanceMirror = classMirror.newInstance( diff --git a/tests/lib_strong/mirrors/reflect_class_test.dart b/tests/lib_strong/mirrors/reflect_class_test.dart index 1ab9c885cea..b2272cf47eb 100644 --- a/tests/lib_strong/mirrors/reflect_class_test.dart +++ b/tests/lib_strong/mirrors/reflect_class_test.dart @@ -12,7 +12,7 @@ main() { Function expectedError = (e) => e is ArgumentError || e is TypeError; Expect.throws(() => reflectClass(dynamic), expectedError); - Expect.throws(() => reflectClass(1), expectedError); // //# 01: static type warning - Expect.throws(() => reflectClass("string"), expectedError); // //# 02: static type warning + Expect.throws(() => reflectClass(1), expectedError); // /// 01: static type warning + Expect.throws(() => reflectClass("string"), expectedError); // /// 02: static type warning Expect.throws(() => reflectClass(FooFunction), expectedError); } diff --git a/tests/lib_strong/mirrors/reflected_type_classes_test.dart b/tests/lib_strong/mirrors/reflected_type_classes_test.dart index 82fef37ffec..1f9b7ce4ed5 100644 --- a/tests/lib_strong/mirrors/reflected_type_classes_test.dart +++ b/tests/lib_strong/mirrors/reflected_type_classes_test.dart @@ -10,7 +10,7 @@ import 'reflected_type_helper.dart'; class A {} class B extends A {} -class C extends A {} // //# 01: static type warning +class C extends A {} // /// 01: static type warning class D extends A {} class E extends A {} class F extends A {} @@ -21,7 +21,7 @@ main() { // Declarations. expectReflectedType(reflectClass(A), null); expectReflectedType(reflectClass(B), B); - expectReflectedType(reflectClass(C), C); // //# 01: continued + expectReflectedType(reflectClass(C), C); // /// 01: continued expectReflectedType(reflectClass(D), D); expectReflectedType(reflectClass(E), null); expectReflectedType(reflectClass(F), null); @@ -31,7 +31,7 @@ main() { // Instantiations. expectReflectedType(reflect(new A()).type, new A().runtimeType); expectReflectedType(reflect(new B()).type, new B().runtimeType); - expectReflectedType(reflect(new C()).type, new C().runtimeType); // //# 01: continued + expectReflectedType(reflect(new C()).type, new C().runtimeType); // /// 01: continued expectReflectedType(reflect(new D()).type, new D().runtimeType); expectReflectedType(reflect(new E()).type, new E().runtimeType); expectReflectedType(reflect(new F()).type, new F().runtimeType); @@ -39,12 +39,12 @@ main() { expectReflectedType(reflect(new H()).type, new H().runtimeType); expectReflectedType(reflect(new A()).type, new A().runtimeType); - expectReflectedType(reflect(new B()).type.superclass, // //# 02: static type warning - new A().runtimeType); // //# 02: continued - expectReflectedType(reflect(new C()).type.superclass, // //# 01: continued - new A().runtimeType); // //# 01: continued - expectReflectedType(reflect(new D()).type.superclass, // //# 03: static type warning - new A().runtimeType); // //# 03: continued + expectReflectedType(reflect(new B()).type.superclass, // /// 02: static type warning + new A().runtimeType); // /// 02: continued + expectReflectedType(reflect(new C()).type.superclass, // /// 01: continued + new A().runtimeType); // /// 01: continued + expectReflectedType(reflect(new D()).type.superclass, // /// 03: static type warning + new A().runtimeType); // /// 03: continued expectReflectedType(reflect(new E()).type, new E().runtimeType); expectReflectedType(reflect(new E()).type.superclass, new A().runtimeType); diff --git a/tests/lib_strong/mirrors/reflected_type_test.dart b/tests/lib_strong/mirrors/reflected_type_test.dart index beba03897b9..84e7468dc35 100644 --- a/tests/lib_strong/mirrors/reflected_type_test.dart +++ b/tests/lib_strong/mirrors/reflected_type_test.dart @@ -10,7 +10,7 @@ import 'package:expect/expect.dart'; class A {} class B extends A {} -class C extends A {} // //# 01: static type warning +class C extends A {} // /// 01: static type warning class D extends A {} class E extends A {} class F extends A {} @@ -43,7 +43,7 @@ main() { // Declarations. expectReflectedType(reflectClass(A), null); expectReflectedType(reflectClass(B), B); - expectReflectedType(reflectClass(C), C); // //# 01: continued + expectReflectedType(reflectClass(C), C); // /// 01: continued expectReflectedType(reflectClass(D), D); expectReflectedType(reflectClass(E), null); expectReflectedType(reflectClass(F), null); @@ -53,7 +53,7 @@ main() { // Instantiations. expectReflectedType(reflect(new A()).type, new A().runtimeType); expectReflectedType(reflect(new B()).type, new B().runtimeType); - expectReflectedType(reflect(new C()).type, new C().runtimeType); // //# 01: continued + expectReflectedType(reflect(new C()).type, new C().runtimeType); // /// 01: continued expectReflectedType(reflect(new D()).type, new D().runtimeType); expectReflectedType(reflect(new E()).type, new E().runtimeType); expectReflectedType(reflect(new F()).type, new F().runtimeType); @@ -61,12 +61,12 @@ main() { expectReflectedType(reflect(new H()).type, new H().runtimeType); expectReflectedType(reflect(new A()).type, new A().runtimeType); - expectReflectedType(reflect(new B()).type.superclass, // //# 02: static type warning - new A().runtimeType); // //# 02: continued - expectReflectedType(reflect(new C()).type.superclass, // //# 01: continued - new A().runtimeType); // //# 01: continued - expectReflectedType(reflect(new D()).type.superclass, // //# 03: static type warning - new A().runtimeType); // //# 03: continued + expectReflectedType(reflect(new B()).type.superclass, // /// 02: static type warning + new A().runtimeType); // /// 02: continued + expectReflectedType(reflect(new C()).type.superclass, // /// 01: continued + new A().runtimeType); // /// 01: continued + expectReflectedType(reflect(new D()).type.superclass, // /// 03: static type warning + new A().runtimeType); // /// 03: continued expectReflectedType(reflect(new E()).type, new E().runtimeType); expectReflectedType(reflect(new E()).type.superclass, new A().runtimeType); diff --git a/tests/lib_strong/mirrors/regress_16321_test.dart b/tests/lib_strong/mirrors/regress_16321_test.dart index 07769f734d2..73433bba9b6 100644 --- a/tests/lib_strong/mirrors/regress_16321_test.dart +++ b/tests/lib_strong/mirrors/regress_16321_test.dart @@ -12,7 +12,7 @@ class TypedBox { const TypedBox(this.contents); } -@TypedBox('foo') // //# 01: static type warning, checked mode compile-time error +@TypedBox('foo') // /// 01: static type warning, checked mode compile-time error @TypedBox(const ['foo']) class C {} diff --git a/tests/lib_strong/mirrors/static_metatarget_test.dart b/tests/lib_strong/mirrors/static_metatarget_test.dart index 8627ac493f1..fe40cae3fb0 100644 --- a/tests/lib_strong/mirrors/static_metatarget_test.dart +++ b/tests/lib_strong/mirrors/static_metatarget_test.dart @@ -9,11 +9,11 @@ import 'dart:mirrors'; class A { - @reflectable var reflectableField = 0; //# 01: ok + @reflectable var reflectableField = 0; /// 01: ok - @UsedOnlyAsMetadata() var unreflectableField = 1; //# 02: ok + @UsedOnlyAsMetadata() var unreflectableField = 1; /// 02: ok - @reflectable static var reflectableStaticField = 2; //# 03: ok + @reflectable static var reflectableStaticField = 2; /// 03: ok @UsedOnlyAsMetadata() static var unreflectableStaticField = 3; } diff --git a/tests/lib_strong/mirrors/symbol_validation_test.dart b/tests/lib_strong/mirrors/symbol_validation_test.dart index 1eef3398400..4026937435d 100644 --- a/tests/lib_strong/mirrors/symbol_validation_test.dart +++ b/tests/lib_strong/mirrors/symbol_validation_test.dart @@ -133,5 +133,5 @@ main() { '_', '_x', 'x._y', 'x._', 'x.y._', 'x._.y', '_true' ]; privateSymbols.forEach(invalidSymbol); - privateSymbols.forEach(validPrivateSymbol); // //# 01: ok + privateSymbols.forEach(validPrivateSymbol); // /// 01: ok } diff --git a/tests/lib_strong/mirrors/syntax_error_test.dart b/tests/lib_strong/mirrors/syntax_error_test.dart index 4f2ee09f08b..b9fb203898c 100644 --- a/tests/lib_strong/mirrors/syntax_error_test.dart +++ b/tests/lib_strong/mirrors/syntax_error_test.dart @@ -17,7 +17,7 @@ class A {} @MD(name:'B') class B { - static x = { 0: 0; }; // //# 01: compile-time error + static x = { 0: 0; }; // /// 01: compile-time error } main() { diff --git a/tests/lib_strong/mirrors/type_variable_owner_test.dart b/tests/lib_strong/mirrors/type_variable_owner_test.dart index a44bf9d9048..5b61831d0eb 100644 --- a/tests/lib_strong/mirrors/type_variable_owner_test.dart +++ b/tests/lib_strong/mirrors/type_variable_owner_test.dart @@ -50,5 +50,5 @@ testTypeVariableOfTypedef() { main() { testTypeVariableOfClass(); - testTypeVariableOfTypedef(); // //# 01: ok + testTypeVariableOfTypedef(); // /// 01: ok } diff --git a/tests/lib_strong/mirrors/typedef_reflected_type_test.dart b/tests/lib_strong/mirrors/typedef_reflected_type_test.dart index 9aca03aa99f..ea1bbb2eff6 100644 --- a/tests/lib_strong/mirrors/typedef_reflected_type_test.dart +++ b/tests/lib_strong/mirrors/typedef_reflected_type_test.dart @@ -21,9 +21,9 @@ main() { var m = reflectClass(C).declarations[#fun]; Expect.equals(Bar, m.returnType.reflectedType); - Expect.equals("Foo", m.parameters[0].type.reflectedType.toString()); // //# 01: ok - Expect.equals(int, m.parameters[0].type.typeArguments[0].reflectedType); // //# 01: continued - Expect.isFalse(m.parameters[0].type.isOriginalDeclaration); // //# 01: continued + Expect.equals("Foo", m.parameters[0].type.reflectedType.toString()); // /// 01: ok + Expect.equals(int, m.parameters[0].type.typeArguments[0].reflectedType); // /// 01: continued + Expect.isFalse(m.parameters[0].type.isOriginalDeclaration); // /// 01: continued var lib = currentMirrorSystem().findLibrary(#test); Expect.isTrue(lib.declarations[#Foo].isOriginalDeclaration); diff --git a/tests/lib_strong/mirrors/variable_is_const_test.dart b/tests/lib_strong/mirrors/variable_is_const_test.dart index bc76ed3800b..fc90fae9aa0 100644 --- a/tests/lib_strong/mirrors/variable_is_const_test.dart +++ b/tests/lib_strong/mirrors/variable_is_const_test.dart @@ -9,7 +9,7 @@ import 'dart:mirrors'; import 'package:expect/expect.dart'; class Class { - const //# 01: compile-time error + const /// 01: compile-time error int instanceWouldBeConst = 1; var instanceNonConst = 2; diff --git a/tests/standalone/black_listed_test.dart b/tests/standalone/black_listed_test.dart index 081b76e14fa..5c3ec0dcdbf 100644 --- a/tests/standalone/black_listed_test.dart +++ b/tests/standalone/black_listed_test.dart @@ -8,52 +8,52 @@ library BlackListedTest; -class MyBool extends Bool {} // //# 01: compile-time error +class MyBool extends Bool {} // /// 01: compile-time error -class MyDouble extends Double {} // //# 02: compile-time error +class MyDouble extends Double {} // /// 02: compile-time error -class MyObjectArray extends ObjectArray {} // //# 03: compile-time error +class MyObjectArray extends ObjectArray {} // /// 03: compile-time error -class MyImmutableArray extends ImmutableArray {} // //# 04: compile-time error +class MyImmutableArray extends ImmutableArray {} // /// 04: compile-time error -class MyGrowableObjectArray extends GrowableObjectArray {} // //# 05: compile-time error +class MyGrowableObjectArray extends GrowableObjectArray {} // /// 05: compile-time error -class MyIntegerImplementation extends IntegerImplementation {} // //# 06: compile-time error +class MyIntegerImplementation extends IntegerImplementation {} // /// 06: compile-time error -class MySmi extends Smi {} // //# 07: compile-time error +class MySmi extends Smi {} // /// 07: compile-time error -class MyMint extends Mint {} // //# 08: compile-time error +class MyMint extends Mint {} // /// 08: compile-time error -class MyBigint extends Bigint {} // //# 09: compile-time error +class MyBigint extends Bigint {} // /// 09: compile-time error -class MyOneByteString extends OneByteString {} // //# 10: compile-time error +class MyOneByteString extends OneByteString {} // /// 10: compile-time error -class MyTwoByteString extends TwoByteString {} // //# 11: compile-time error +class MyTwoByteString extends TwoByteString {} // /// 11: compile-time error -class MyFourByteString extends FourByteString {} // //# 12: compile-time error +class MyFourByteString extends FourByteString {} // /// 12: compile-time error main() { - new MyBool(); //# 01: continued + new MyBool(); /// 01: continued - new MyDouble(); //# 02: continued + new MyDouble(); /// 02: continued - new MyObjectArray(); //# 03: continued + new MyObjectArray(); /// 03: continued - new MyImmutableArray(); //# 04: continued + new MyImmutableArray(); /// 04: continued - new MyGrowableObjectArray(); //# 05: continued + new MyGrowableObjectArray(); /// 05: continued - new MyIntegerImplementation(); //# 06: continued + new MyIntegerImplementation(); /// 06: continued - new MySmi(); //# 07: continued + new MySmi(); /// 07: continued - new MyMint(); //# 08: continued + new MyMint(); /// 08: continued - new MyBigint(); //# 09: continued + new MyBigint(); /// 09: continued - new MyOneByteString(); //# 10: continued + new MyOneByteString(); /// 10: continued - new MyTwoByteString(); //# 11: continued + new MyTwoByteString(); /// 11: continued - new MyFourByteString(); //# 12: continued + new MyFourByteString(); /// 12: continued } diff --git a/tests/standalone/io/platform_resolved_executable_test.dart b/tests/standalone/io/platform_resolved_executable_test.dart index 9d8b6b458d8..b5ae47c1f34 100644 --- a/tests/standalone/io/platform_resolved_executable_test.dart +++ b/tests/standalone/io/platform_resolved_executable_test.dart @@ -141,17 +141,17 @@ void main() { } testDartExecShouldNotBeInCurrentDir(); - testShouldSucceedWithSourcePlatformExecutable(); //# 00: ok + testShouldSucceedWithSourcePlatformExecutable(); /// 00: ok // dart:io does not support linking to files in Windows. if (!Platform.isWindows) { - withTempDir(testExeSymLinked); //# 01: ok + withTempDir(testExeSymLinked); /// 01: ok } - withTempDir(testExeDirSymLinked); //# 02: ok - testPathToSDKDir(); //# 03: ok - withTempDir(testPathPointsToSymLinkedSDKPath); //# 04: ok + withTempDir(testExeDirSymLinked); /// 02: ok + testPathToSDKDir(); /// 03: ok + withTempDir(testPathPointsToSymLinkedSDKPath); /// 04: ok // dart:io does not support linking to files in Windows. if (!Platform.isWindows) { - withTempDir(testPathToDirWithExeSymLinked); //# 05: ok + withTempDir(testPathToDirWithExeSymLinked); /// 05: ok } - testShouldFailOutsidePath(); //# 06: ok + testShouldFailOutsidePath(); /// 06: ok } diff --git a/tests/standalone/io/socket_ipv6_test.dart b/tests/standalone/io/socket_ipv6_test.dart index f7176a57d04..476e597af42 100644 --- a/tests/standalone/io/socket_ipv6_test.dart +++ b/tests/standalone/io/socket_ipv6_test.dart @@ -130,12 +130,12 @@ Future testIPv4toIPv6_IPV6Only() { } main() async { - await testIPv6toIPv6(); // //# 01: ok - await testIPv4toIPv6(); // //# 02: ok - await testIPv4toIPv4(); // //# 03: ok - await testIPv6Lookup(); // //# 04: ok - await testIPv4Lookup(); // //# 05: ok + await testIPv6toIPv6(); // /// 01: ok + await testIPv4toIPv6(); // /// 02: ok + await testIPv4toIPv4(); // /// 03: ok + await testIPv6Lookup(); // /// 04: ok + await testIPv4Lookup(); // /// 05: ok - await retry(testIPv6toIPv4); // //# 06: ok - await retry(testIPv4toIPv6_IPV6Only); // //# 07: ok + await retry(testIPv6toIPv4); // /// 06: ok + await retry(testIPv4toIPv6_IPV6Only); // /// 07: ok } diff --git a/tests/standalone/packages_file_test.dart b/tests/standalone/packages_file_test.dart index f0004e5dbf8..8464ab1cde6 100644 --- a/tests/standalone/packages_file_test.dart +++ b/tests/standalone/packages_file_test.dart @@ -28,16 +28,16 @@ main() async { asyncStart(); await setUp(); - await runTests(); // //# 01: ok - await runTests([spawn]); // //# 02: ok - await runTests([spawn, spawn]); // //# 03: ok - await runTests([spawnUriInherit]); // //# 04: ok - await runTests([spawnUriInherit, spawn]); // //# 05: ok - await runTests([spawn, spawnUriInherit]); // //# 06: ok + await runTests(); // /// 01: ok + await runTests([spawn]); // /// 02: ok + await runTests([spawn, spawn]); // /// 03: ok + await runTests([spawnUriInherit]); // /// 04: ok + await runTests([spawnUriInherit, spawn]); // /// 05: ok + await runTests([spawn, spawnUriInherit]); // /// 06: ok // Test that spawning a new VM with file paths instead of URIs as arguments // gives the same URIs in the internal values. - await runTests([asPath]); // //# 07: ok + await runTests([asPath]); // /// 07: ok // Test that spawnUri can reproduce the behavior of VM command line parameters // exactly. @@ -51,14 +51,14 @@ main() async { groups[i % groupCount].add(configurations[i]); } var group = -1; - group = 0; // //# 10: ok - group = 1; // //# 11: ok - group = 2; // //# 12: ok - group = 3; // //# 13: ok - group = 4; // //# 14: ok - group = 5; // //# 15: ok - group = 6; // //# 16: ok - group = 7; // //# 17: ok + group = 0; // /// 10: ok + group = 1; // /// 11: ok + group = 2; // /// 12: ok + group = 3; // /// 13: ok + group = 4; // /// 14: ok + group = 5; // /// 15: ok + group = 6; // /// 16: ok + group = 7; // /// 17: ok if (group >= 0) { for (var other in groups[group]) { await runTests([spawnUriOther(other)]); diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart index d0402da14d4..b714e718e84 100644 --- a/tools/testing/dart/multitest.dart +++ b/tools/testing/dart/multitest.dart @@ -12,9 +12,6 @@ import "test_suite.dart"; import "utils.dart"; // Multitests are Dart test scripts containing lines of the form -// " [some dart code] //# [key]: [error type]" -// -// To support legacy multi tests we also handle lines of the form // " [some dart code] /// [key]: [error type]" // // For each key in the file, a new test file is made containing all @@ -31,10 +28,10 @@ import "utils.dart"; // // For example: file I_am_a_multitest.dart // aaa -// bbb //# 02: runtime error -// ccc //# 02: continued -// ddd //# 07: static type warning -// eee //# 10: ok +// bbb /// 02: runtime error +// ccc /// 02: continued +// ddd /// 07: static type warning +// eee /// 10: ok // fff // // should create four tests: @@ -44,29 +41,26 @@ import "utils.dart"; // // I_am_a_multitest_02.dart // aaa -// bbb //# 02: runtime error -// ccc //# 02: continued +// bbb /// 02: runtime error +// ccc /// 02: continued // fff // // I_am_a_multitest_07.dart // aaa -// ddd //# 07: static type warning +// ddd /// 07: static type warning // fff // // and I_am_a_multitest_10.dart // aaa -// eee //# 10: ok +// eee /// 10: ok // fff // // Note that it is possible to indicate more than one acceptable outcome // in the case of dynamic and static type warnings // aaa -// ddd //# 07: static type warning, dynamic type error +// ddd /// 07: static type warning, dynamic type error // fff -/// Until legacy multitests are ported we need to support both /// and //# -final _multitestMarker = new RegExp(r"//[/#]"); - void ExtractTestsFromMultitest(Path filePath, Map tests, Map> outcomes) { // Read the entire file into a byte buffer and transform it to a @@ -75,10 +69,8 @@ void ExtractTestsFromMultitest(Path filePath, Map tests, List bytes = new File(filePath.toNativePath()).readAsBytesSync(); String contents = decodeUtf8(bytes); int first_newline = contents.indexOf('\n'); - final String line_separator = - (first_newline == 0 || contents[first_newline - 1] != '\r') - ? '\n' - : '\r\n'; + final String line_separator = (first_newline == 0 || + contents[first_newline - 1] != '\r') ? '\n' : '\r\n'; List lines = contents.split(line_separator); if (lines.last == '') lines.removeLast(); bytes = null; @@ -156,7 +148,7 @@ void ExtractTestsFromMultitest(Path filePath, Map tests, } } -// Represents a mutlitest annotation in the special //# comment. +// Represents a mutlitest annotation in the special /// comment. class _Annotation { String key; String rest; @@ -165,11 +157,11 @@ class _Annotation { factory _Annotation.from(String line) { // Do an early return with "null" if this is not a valid multitest // annotation. - if (!line.contains(_multitestMarker)) { + if (!line.contains('///')) { return null; } var parts = line - .split(_multitestMarker)[1] + .split('///')[1] .split(':') .map((s) => s.trim()) .where((s) => s.length > 0) @@ -228,8 +220,12 @@ Set _findAllRelativeImports(Path topLibrary) { return foundImports; } -Future doMultitest(Path filePath, String outputDir, Path suiteDir, - CreateTest doTest, bool hotReload) { +Future doMultitest( + Path filePath, + String outputDir, + Path suiteDir, + CreateTest doTest, + bool hotReload) { void writeFile(String filepath, String content) { final File file = new File(filepath); @@ -310,10 +306,8 @@ String suiteNameFromPath(Path suiteDir) { Path createMultitestDirectory(String outputDir, Path suiteDir, Path sourceDir) { Path relative = sourceDir.relativeTo(suiteDir); - Path path = new Path(outputDir) - .append('generated_tests') - .append(suiteNameFromPath(suiteDir)) - .join(relative); + Path path = new Path(outputDir).append('generated_tests') + .append(suiteNameFromPath(suiteDir)).join(relative); TestUtils.mkdirRecursive(TestUtils.currentWorkingDirectory, path); return new Path(new File(path.toNativePath()).absolute.path); } diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart index 6900345815c..5addb706236 100644 --- a/tools/testing/dart/test_suite.dart +++ b/tools/testing/dart/test_suite.dart @@ -36,9 +36,9 @@ import 'browser_test.dart'; RegExp multiHtmlTestGroupRegExp = new RegExp(r"\s*[^/]\s*group\('[^,']*"); RegExp multiHtmlTestRegExp = new RegExp(r"useHtmlIndividualConfiguration()"); -// Require at least one non-space character before '//[/#]' +// Require at least one non-space character before '///' RegExp multiTestRegExp = new RegExp(r"\S *" - r"//[#/] \w+:(.*)"); + r"/// \w+:(.*)"); RegExp dartExtension = new RegExp(r'\.dart$'); /** @@ -308,8 +308,7 @@ abstract class TestSuite { if (configuration['hot_reload'] || configuration['hot_reload_rollback']) { // Handle reload special cases. if (expectations.contains(Expectation.COMPILETIME_ERROR) || - testCase.hasCompileError || - testCase.expectCompileError) { + testCase.hasCompileError || testCase.expectCompileError) { // Running a test that expects a compilation error with hot reloading // is redundant with a regular run of the test. return; @@ -384,7 +383,7 @@ abstract class TestSuite { String createOutputDirectory(Path testPath, String optionsName) { var checked = configuration['checked'] ? '-checked' : ''; - var strong = configuration['strong'] ? '-strong' : ''; + var strong = configuration['strong'] ? '-strong' : ''; var minified = configuration['minified'] ? '-minified' : ''; var sdk = configuration['use_sdk'] ? '-sdk' : ''; var dirName = "${configuration['compiler']}-${configuration['runtime']}" @@ -395,7 +394,7 @@ abstract class TestSuite { String createCompilationOutputDirectory(Path testPath) { var checked = configuration['checked'] ? '-checked' : ''; - var strong = configuration['strong'] ? '-strong' : ''; + var strong = configuration['strong'] ? '-strong' : ''; var minified = configuration['minified'] ? '-minified' : ''; var csp = configuration['csp'] ? '-csp' : ''; var sdk = configuration['use_sdk'] ? '-sdk' : ''; @@ -835,13 +834,12 @@ class StandardTestSuite extends TestSuite { CreateTest createTestCase = makeTestCaseCreator(optionsFromFile); if (optionsFromFile['isMultitest']) { - group.add(doMultitest( - filePath, - buildDir, - suiteDir, - createTestCase, - (configuration['hot_reload'] || - configuration['hot_reload_rollback']))); + group.add(doMultitest(filePath, + buildDir, + suiteDir, + createTestCase, + (configuration['hot_reload'] || + configuration['hot_reload_rollback']))); } else { createTestCase(filePath, filePath, optionsFromFile['hasCompileError'], optionsFromFile['hasRuntimeError'], @@ -1135,8 +1133,8 @@ class StandardTestSuite extends TestSuite { String optionsName = multipleOptions ? vmOptions.join('-').replaceAll(badChars, '') : ''; String tempDir = createOutputDirectory(info.filePath, optionsName); - enqueueBrowserTestWithOptions(baseCommands, packageRoot, packages, info, - testName, expectations, vmOptions, tempDir); + enqueueBrowserTestWithOptions(baseCommands, packageRoot, packages, + info, testName, expectations, vmOptions, tempDir); } } @@ -1403,8 +1401,8 @@ class StandardTestSuite extends TestSuite { args = []; } args.addAll(TestUtils.standardOptions(configuration)); - String packages = packagesArgument( - optionsFromFile['packageRoot'], optionsFromFile['packages']); + String packages = packagesArgument(optionsFromFile['packageRoot'], + optionsFromFile['packages']); if (packages != null) args.add(packages); args.add('--out=$outputFile'); args.add(inputFile); @@ -1424,8 +1422,8 @@ class StandardTestSuite extends TestSuite { Command _polymerDeployCommand( String inputFile, String outputDir, optionsFromFile) { List args = []; - String packages = packagesArgument( - optionsFromFile['packageRoot'], optionsFromFile['packages']); + String packages = packagesArgument(optionsFromFile['packageRoot'], + optionsFromFile['packages']); if (packages != null) args.add(packages); args ..add('package:polymer/deploy.dart') @@ -1480,8 +1478,8 @@ class StandardTestSuite extends TestSuite { List commonArgumentsFromFile(Path filePath, Map optionsFromFile) { List args = TestUtils.standardOptions(configuration); - String packages = packagesArgument( - optionsFromFile['packageRoot'], optionsFromFile['packages']); + String packages = packagesArgument(optionsFromFile['packageRoot'], + optionsFromFile['packages']); if (packages != null) { args.add(packages); } @@ -1509,15 +1507,17 @@ class StandardTestSuite extends TestSuite { return args; } - String packagesArgument(String packageRootFromFile, String packagesFromFile) { - if (packageRootFromFile == 'none' || packagesFromFile == 'none') { + String packagesArgument(String packageRootFromFile, + String packagesFromFile) { + if (packageRootFromFile == 'none' || + packagesFromFile == 'none') { return null; } else if (packagesFromFile != null) { return '--packages=$packagesFromFile'; } else if (packageRootFromFile != null) { return '--package-root=$packageRootFromFile'; } else { - return null; + return null; } } @@ -1717,7 +1717,7 @@ class StandardTestSuite extends TestSuite { Map optionsFromKernelFile() { return const { - "vmOptions": const [const []], + "vmOptions": const [ const []], "sharedOptions": const [], "dartOptions": null, "packageRoot": null, @@ -1933,8 +1933,7 @@ class PkgBuildTestSuite extends TestSuite { var commands = [ CommandBuilder.instance.getCopyCommand(directory, checkoutDir), CommandBuilder.instance.getPubCommand( - "get", pubPath, checkoutDir, cacheDir, - arguments: ['--verbose']) + "get", pubPath, checkoutDir, cacheDir, arguments: ['--verbose']) ]; bool containsWebDirectory = dirExists(directoryPath.append('web')); @@ -2143,7 +2142,7 @@ class TestUtils { configuration['compiler'] == 'dart2appjit' || configuration['compiler'] == 'precompiler') { var checked = configuration['checked'] ? '-checked' : ''; - var strong = configuration['strong'] ? '-strong' : ''; + var strong = configuration['strong'] ? '-strong' : ''; var minified = configuration['minified'] ? '-minified' : ''; var csp = configuration['csp'] ? '-csp' : ''; var sdk = configuration['use_sdk'] ? '-sdk' : ''; @@ -2345,7 +2344,7 @@ class TestUtils { static List getExtraVmOptions(Map configuration) => getExtraOptions(configuration, 'vm_options'); - static int shortNameCounter = 0; // Make unique short file names on Windows. + static int shortNameCounter = 0; // Make unique short file names on Windows. static String getShortName(String path) { final PATH_REPLACEMENTS = const {