Skip to content
Snippets Groups Projects
Commit 814a454b authored by Natalie Weizenbaum's avatar Natalie Weizenbaum
Browse files

Fix tests that were broken in Chrome.

R=kevmoo@google.com

Review URL: https://codereview.chromium.org//1031063003
parent 017aadab
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ void main() {
expectTestFailed(liveTest,
"Expected: prints 'Goodbye, world!\\n'\n"
" ''\n"
" Actual: <Closure: () => dynamic>\n"
" Actual: <$closureString>\n"
" Which: printed 'Hello, world!\\n'\n"
" ''\n"
" Which: is different.\n"
......@@ -49,7 +49,7 @@ void main() {
}).then((liveTest) {
expectTestFailed(liveTest,
"Expected: prints contains 'Goodbye'\n"
" Actual: <Closure: () => dynamic>\n"
" Actual: <$closureString>\n"
" Which: printed 'Hello, world!\\n'\n"
" ''\n");
});
......@@ -61,7 +61,7 @@ void main() {
}).then((liveTest) {
expectTestFailed(liveTest,
"Expected: prints contains 'Goodbye'\n"
" Actual: <Closure: () => dynamic>\n"
" Actual: <$closureString>\n"
" Which: printed nothing.\n");
});
});
......@@ -103,7 +103,7 @@ void main() {
expectTestFailed(liveTest, startsWith(
"Expected: prints 'Goodbye, world!\\n'\n"
" ''\n"
" Actual: <Closure: () => dynamic>\n"
" Actual: <$closureString>\n"
" Which: printed 'Hello, world!\\n'\n"
" ''\n"
" Which: is different.\n"
......@@ -121,7 +121,7 @@ void main() {
}).then((liveTest) {
expectTestFailed(liveTest, startsWith(
"Expected: prints contains 'Goodbye'\n"
" Actual: <Closure: () => dynamic>\n"
" Actual: <$closureString>\n"
" Which: printed 'Hello, world!\\n'\n"
" ''"));
});
......@@ -133,7 +133,7 @@ void main() {
}).then((liveTest) {
expectTestFailed(liveTest, startsWith(
"Expected: prints contains 'Goodbye'\n"
" Actual: <Closure: () => dynamic>\n"
" Actual: <$closureString>\n"
" Which: printed nothing."));
});
});
......
......@@ -21,7 +21,7 @@ void main() {
}).then((liveTest) {
expectTestFailed(liveTest,
"Expected: throws\n"
" Actual: <Closure: () => dynamic>\n"
" Actual: <$closureString>\n"
" Which: did not throw\n");
});
});
......@@ -54,7 +54,7 @@ void main() {
}).then((liveTest) {
expectTestFailed(liveTest,
"Expected: throws 'oh no'\n"
" Actual: <Closure: () => dynamic>\n"
" Actual: <$closureString>\n"
" Which: did not throw\n");
});
});
......@@ -76,7 +76,7 @@ void main() {
}).then((liveTest) {
expectTestFailed(liveTest,
"Expected: throws 'oh no'\n"
" Actual: <Closure: () => dynamic>\n"
" Actual: <$closureString>\n"
" Which: threw 'aw dang'\n");
});
});
......@@ -132,7 +132,7 @@ void main() {
}).then((liveTest) {
expectTestFailed(liveTest, startsWith(
"Expected: throws 'oh no'\n"
" Actual: <Closure: () => dynamic>\n"
" Actual: <$closureString>\n"
" Which: threw 'aw dang'\n"));
});
});
......
......@@ -15,6 +15,11 @@ import 'package:unittest/src/runner/load_exception.dart';
import 'package:unittest/src/util/remote_exception.dart';
import 'package:unittest/unittest.dart';
/// The string representation of an untyped closure with no arguments.
///
/// This differs between dart2js and the VM.
final String closureString = (() {}).toString();
// The last state change detected via [expectStates].
State lastState;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment