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

Unified Diff: tests/language/conditional_property_access_test.dart

Issue 2765893003: Fix warnings_checker.dart handling of multitests (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/language/conditional_property_access_test.dart
diff --git a/tests/language/conditional_property_access_test.dart b/tests/language/conditional_property_access_test.dart
index b5dfa85f432833e9be14bc897a34428c8d7b882e..d841a0cd4dabe7776377f80a7870c5ab1d9384aa 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
}
« no previous file with comments | « tests/language/conditional_method_invocation_test.dart ('k') | tests/language/conditional_property_assignment_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698