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

Unified Diff: tests/language/constructor_return_test.dart

Issue 23761003: Update language.status and rewrite two tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/constructor_return_test.dart
diff --git a/tests/language/constructor_return_test.dart b/tests/language/constructor_return_test.dart
index 8f306458929d7caf9106707279d592868ec8e4f2..e8a15e6f1e5cec38c2a75114543b9d275d632e74 100644
--- a/tests/language/constructor_return_test.dart
+++ b/tests/language/constructor_return_test.dart
@@ -9,9 +9,17 @@ import "package:expect/expect.dart";
class A {
int x;
A(this.x) { return; } // 'return;' is equivalent to 'return this;'
kustermann 2013/08/30 11:12:44 If 'return;' is equivalent to 'return this;', what
Søren Gjesse 2013/08/30 13:40:02 The comment is bogus, and I have removed it. The
+ A.test1(this.x) {
+ return this; /// 01: compile-time error
+ }
+ A.test2(this.x) {
+ return null; /// 02: compile-time error
+ }
int foo(int y) => x + y;
}
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);
}

Powered by Google App Engine
This is Rietveld 408576698