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
bc10ce6f
Commit
bc10ce6f
authored
7 years ago
by
Natalie Weizenbaum
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix onPlatform when used on a group(). (#613)
Closes #578
parent
68ded306
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGELOG.md
+2
-0
2 additions, 0 deletions
CHANGELOG.md
lib/test.dart
+5
-1
5 additions, 1 deletion
lib/test.dart
test/runner/runner_test.dart
+24
-0
24 additions, 0 deletions
test/runner/runner_test.dart
with
31 additions
and
1 deletion
CHANGELOG.md
+
2
−
0
View file @
bc10ce6f
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
*
`throwsA()`
and all related matchers will now match functions that return
*
`throwsA()`
and all related matchers will now match functions that return
`Future`
s that emit exceptions.
`Future`
s that emit exceptions.
*
Respect
`onPlatform`
for groups.
## 0.12.20+13
## 0.12.20+13
*
Upgrade to package:matcher 0.12.1
*
Upgrade to package:matcher 0.12.1
...
...
This diff is collapsed.
Click to expand it.
lib/test.dart
+
5
−
1
View file @
bc10ce6f
...
@@ -196,7 +196,11 @@ void group(description, body(),
...
@@ -196,7 +196,11 @@ void group(description, body(),
tags
,
tags
,
Map
<
String
,
dynamic
>
onPlatform
})
{
Map
<
String
,
dynamic
>
onPlatform
})
{
_declarer
.
group
(
description
.
toString
(),
body
,
_declarer
.
group
(
description
.
toString
(),
body
,
testOn:
testOn
,
timeout:
timeout
,
skip:
skip
,
tags:
tags
);
testOn:
testOn
,
timeout:
timeout
,
skip:
skip
,
tags:
tags
,
onPlatform:
onPlatform
);
// Force dart2js not to inline this function. We need it to be separate from
// Force dart2js not to inline this function. We need it to be separate from
// `main()` in JS stack traces in order to properly determine the line and
// `main()` in JS stack traces in order to properly determine the line and
...
...
This diff is collapsed.
Click to expand it.
test/runner/runner_test.dart
+
24
−
0
View file @
bc10ce6f
...
@@ -562,6 +562,30 @@ void main() {
...
@@ -562,6 +562,30 @@ void main() {
test
.
stdout
.
expect
(
consumeThrough
(
contains
(
"Skip: fifth"
)));
test
.
stdout
.
expect
(
consumeThrough
(
contains
(
"Skip: fifth"
)));
test
.
shouldExit
(
0
);
test
.
shouldExit
(
0
);
});
});
test
(
"applies platforms to a group"
,
()
{
d
.
file
(
"test.dart"
,
'''
import '
dart:
async
';
import '
package:
test
/
test
.
dart
';
void main() {
group("group", () {
test("success", () {});
}, onPlatform: {
"vm": new Skip()
});
}
'''
)
.
create
();
var
test
=
runTest
([
"test.dart"
]);
test
.
stdout
.
expect
(
consumeThrough
(
contains
(
"All tests skipped."
)));
test
.
shouldExit
(
0
);
});
});
});
group
(
"with an @OnPlatform annotation"
,
()
{
group
(
"with an @OnPlatform annotation"
,
()
{
...
...
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