Skip to content
Merged
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
9 changes: 6 additions & 3 deletions json_serializable/test/annotation_version_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@Timeout.factor(2)
library;

import 'dart:convert';
import 'dart:io';

import 'package:json_serializable/src/check_dependencies.dart';
Expand Down Expand Up @@ -189,7 +190,7 @@ class SomeClass{}

final output = lines.toString();
final expectedWarningCount = message == null ? 0 : 1;
final warningCount = '[WARNING]'.allMatches(output).length;
final warningCount = _warningStartOfLine.allMatches(output).length;
expect(
warningCount,
expectedWarningCount,
Expand All @@ -202,10 +203,12 @@ class SomeClass{}
expect(
output,
contains('''
[WARNING] json_serializable on $sourceDirectory/sample.dart:
$message'''),
W json_serializable on $sourceDirectory/sample.dart:
${LineSplitter.split(message).map((line) => ' $line').join('\n')}'''),
);
}

await proc.shouldExit(0);
}

final _warningStartOfLine = RegExp(r'^W ', multiLine: true);