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

Unified Diff: dart/tests/compiler/dart2js/types_of_captured_variables_test.dart

Issue 27524003: Generate tear-off closures dynamically. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed unit tests. Created 7 years 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: dart/tests/compiler/dart2js/types_of_captured_variables_test.dart
diff --git a/dart/tests/compiler/dart2js/types_of_captured_variables_test.dart b/dart/tests/compiler/dart2js/types_of_captured_variables_test.dart
index 9e802bd153a70387425430856c7f11777c864fe9..32f61e3c3b4b04c354853a4734226ab54236bf77 100644
--- a/dart/tests/compiler/dart2js/types_of_captured_variables_test.dart
+++ b/dart/tests/compiler/dart2js/types_of_captured_variables_test.dart
@@ -9,7 +9,7 @@ import 'compiler_helper.dart';
const String TEST1 = r"""
main() {
var a = 52;
- var f = () => a + 3;
+ var f = () => a + 87;
Johnni Winther 2013/12/05 11:49:56 Why these changes?
ahe 2013/12/06 15:57:54 The code in ReflectionInfo contains "+ 3", so I ne
f();
}
""";
@@ -18,7 +18,7 @@ const String TEST2 = r"""
main() {
var a = 52;
var g = () { a = 48; };
- var f = () => a + 3;
+ var f = () => a + 87;
f();
g();
}
@@ -28,7 +28,7 @@ const String TEST3 = r"""
main() {
var a = 52;
var g = () { a = 'foo'; };
- var f = () => a + 3;
+ var f = () => a + 87;
f();
g();
}
@@ -37,17 +37,17 @@ main() {
main() {
// Test that we know the type of captured, non-mutated variables.
asyncTest(() => compileAll(TEST1).then((generated) {
- Expect.isTrue(generated.contains('+ 3'));
+ Expect.isTrue(generated.contains('+ 87'));
}));
// Test that we know the type of captured, mutated variables.
asyncTest(() => compileAll(TEST2).then((generated) {
- Expect.isTrue(generated.contains('+ 3'));
+ Expect.isTrue(generated.contains('+ 87'));
}));
// Test that we know when types of a captured, mutated variable
// conflict.
asyncTest(() => compileAll(TEST3).then((generated) {
- Expect.isFalse(generated.contains('+ 3'));
+ Expect.isFalse(generated.contains('+ 87'));
}));
}

Powered by Google App Engine
This is Rietveld 408576698