Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/src/api/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,13 @@ class Test {
/// See [TestDoneEvent](https://github.com/dart-lang/test/blob/master/pkgs/test/doc/json_reporter.md#testdoneevent).
final bool isHidden;

/// URL for the current test file
final String url;

/// Creates a Test with the given [name], [duration], [skipReason],
/// [problems], [prints] and [isHidden].
Test(this.name, this.duration, this.skipReason, Iterable<Problem> problems,
Iterable<String> prints, this.isHidden)
Iterable<String> prints, this.isHidden, this.url)
: problems = List.unmodifiable(problems),
prints = List.unmodifiable(prints);

Expand Down
5 changes: 4 additions & 1 deletion lib/src/impl/processor1.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ class Processor1 implements Processor {
var testCase = _Test()
..startTime = event['time'] as int
..name = test['name'] as String
..skipReason = test['metadata']['skipReason'] as String;
..skipReason = test['metadata']['skipReason'] as String
..url = test['url'] as String;

tests[test['id'] as int] = testCase;
suites[test['suiteID']].tests.add(testCase);
Expand Down Expand Up @@ -82,6 +83,7 @@ class _Test {
List<Problem> problems = <Problem>[];
List<String> prints = <String>[];
bool hidden;
String url;

Test toTestCase() => Test(
name,
Expand All @@ -90,6 +92,7 @@ class _Test {
problems,
prints,
hidden && problems.isEmpty,
url,
);
}

Expand Down