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

Unified Diff: tests/language/constructor_return_test.dart

Issue 23691029: Update language.status and rewrite some tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review commetns Created 7 years, 3 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
« no previous file with comments | « no previous file | tests/language/constructor_return_with_arrow_negative_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/constructor_return_test.dart
diff --git a/tests/language/constructor_return_test.dart b/tests/language/constructor_return_test.dart
index f46c9ecc5a7e7dffd73bbf018119ad7987b8718a..a48507dc34e133c02ecf678ad85ec21125f4b530 100644
--- a/tests/language/constructor_return_test.dart
+++ b/tests/language/constructor_return_test.dart
@@ -18,8 +18,25 @@ class A {
int foo(int y) => x + y;
}
+class B {
+ B() => null; /// 03: compile-time error
+}
+
+class C {
+ int value;
+ C() : value = 1 { return null; } /// 04: compile-time error
+}
+
+class D {
+ int value;
+ D(): value = 1 => null; /// 05: compile-time error
+}
+
main() {
Expect.equals((new A(1)).foo(10), 11);
Expect.equals((new A.test1(1)).foo(10), 11);
Expect.equals((new A.test2(1)).foo(10), 11);
+ new B();
+ new C();
+ new D();
}
« no previous file with comments | « no previous file | tests/language/constructor_return_with_arrow_negative_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698