mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 17:40:04 +00:00
[tests] Make corelib/string_split_test conditional rather than multitest
corelib/string_split_test/checkedstore goes away. Change-Id: I00ad3d42ef2c9798c2a76c6e8ca568954cb1e9f4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333643 Reviewed-by: Kallen Tu <kallentu@google.com> Commit-Queue: Stephen Adams <sra@google.com>
This commit is contained in:
parent
9fa33d8acd
commit
4bc730b18b
|
@ -24,10 +24,12 @@ testSplit(List<String> expect, String string, Pattern pattern) {
|
|||
// Ensure that the correct type is reified.
|
||||
actual = actual as List<String>;
|
||||
|
||||
// Check that store of the wrong type throws. Some platforms don't do this,
|
||||
// so it's protected by multitest syntax.
|
||||
Expect.throwsTypeError(() => actual.add(42), // //# checkedstore: ok
|
||||
'List<String>.add should not accept an int'); // //# checkedstore: ok
|
||||
// Check that store of the wrong type throws. Don't test on configurations
|
||||
// that don't perform type checks.
|
||||
if (!dart2jsProductionMode) {
|
||||
Expect.throwsTypeError(() => actual.add(42),
|
||||
'List<String>.add should not accept an int');
|
||||
}
|
||||
|
||||
Expect.listEquals(expect, actual, '"$string".split($patternString)');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue