Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
chromium.googlesource.com-external-github.com-dart-lang-test
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
chromium.googlesource.com-external-github.com-dart-lang-test
Commits
814a454b
Commit
814a454b
authored
10 years ago
by
Natalie Weizenbaum
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests that were broken in Chrome.
R=kevmoo@google.com Review URL:
https://codereview.chromium.org//1031063003
parent
017aadab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/frontend/matcher/prints_test.dart
+6
-6
6 additions, 6 deletions
test/frontend/matcher/prints_test.dart
test/frontend/matcher/throws_test.dart
+4
-4
4 additions, 4 deletions
test/frontend/matcher/throws_test.dart
test/utils.dart
+5
-0
5 additions, 0 deletions
test/utils.dart
with
15 additions
and
10 deletions
test/frontend/matcher/prints_test.dart
+
6
−
6
View file @
814a454b
...
...
@@ -32,7 +32,7 @@ void main() {
expectTestFailed
(
liveTest
,
"Expected: prints 'Goodbye, world!
\\
n'
\n
"
" ''
\n
"
" Actual: <
C
losure
: () => dynamic
>
\n
"
" Actual: <
$c
losure
String
>
\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: <
C
losure
: () => dynamic
>
\n
"
" Actual: <
$c
losure
String
>
\n
"
" Which: printed 'Hello, world!
\\
n'
\n
"
" ''
\n
"
);
});
...
...
@@ -61,7 +61,7 @@ void main() {
})
.
then
((
liveTest
)
{
expectTestFailed
(
liveTest
,
"Expected: prints contains 'Goodbye'
\n
"
" Actual: <
C
losure
: () => dynamic
>
\n
"
" Actual: <
$c
losure
String
>
\n
"
" Which: printed nothing.
\n
"
);
});
});
...
...
@@ -103,7 +103,7 @@ void main() {
expectTestFailed
(
liveTest
,
startsWith
(
"Expected: prints 'Goodbye, world!
\\
n'
\n
"
" ''
\n
"
" Actual: <
C
losure
: () => dynamic
>
\n
"
" Actual: <
$c
losure
String
>
\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: <
C
losure
: () => dynamic
>
\n
"
" Actual: <
$c
losure
String
>
\n
"
" Which: printed 'Hello, world!
\\
n'
\n
"
" ''"
));
});
...
...
@@ -133,7 +133,7 @@ void main() {
})
.
then
((
liveTest
)
{
expectTestFailed
(
liveTest
,
startsWith
(
"Expected: prints contains 'Goodbye'
\n
"
" Actual: <
C
losure
: () => dynamic
>
\n
"
" Actual: <
$c
losure
String
>
\n
"
" Which: printed nothing."
));
});
});
...
...
This diff is collapsed.
Click to expand it.
test/frontend/matcher/throws_test.dart
+
4
−
4
View file @
814a454b
...
...
@@ -21,7 +21,7 @@ void main() {
})
.
then
((
liveTest
)
{
expectTestFailed
(
liveTest
,
"Expected: throws
\n
"
" Actual: <
C
losure
: () => dynamic
>
\n
"
" Actual: <
$c
losure
String
>
\n
"
" Which: did not throw
\n
"
);
});
});
...
...
@@ -54,7 +54,7 @@ void main() {
})
.
then
((
liveTest
)
{
expectTestFailed
(
liveTest
,
"Expected: throws 'oh no'
\n
"
" Actual: <
C
losure
: () => dynamic
>
\n
"
" Actual: <
$c
losure
String
>
\n
"
" Which: did not throw
\n
"
);
});
});
...
...
@@ -76,7 +76,7 @@ void main() {
})
.
then
((
liveTest
)
{
expectTestFailed
(
liveTest
,
"Expected: throws 'oh no'
\n
"
" Actual: <
C
losure
: () => dynamic
>
\n
"
" Actual: <
$c
losure
String
>
\n
"
" Which: threw 'aw dang'
\n
"
);
});
});
...
...
@@ -132,7 +132,7 @@ void main() {
})
.
then
((
liveTest
)
{
expectTestFailed
(
liveTest
,
startsWith
(
"Expected: throws 'oh no'
\n
"
" Actual: <
C
losure
: () => dynamic
>
\n
"
" Actual: <
$c
losure
String
>
\n
"
" Which: threw 'aw dang'
\n
"
));
});
});
...
...
This diff is collapsed.
Click to expand it.
test/utils.dart
+
5
−
0
View file @
814a454b
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment