mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
![Devon Carew](/assets/img/avatar_default.png)
Change-Id: I30ff886916205ab266208ab98fa97ea41cbe06e4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247624 Reviewed-by: William Hesse <whesse@google.com> Commit-Queue: Devon Carew <devoncarew@google.com>
28 lines
815 B
Dart
28 lines
815 B
Dart
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// Test that the test matrix in the SDK can be parsed correctly.
|
|
|
|
import 'dart:convert' show jsonDecode;
|
|
import 'dart:io' show File, Platform;
|
|
|
|
import 'package:smith/smith.dart' show TestMatrix;
|
|
|
|
main() {
|
|
var path = Platform.script.resolve("bots/test_matrix.json").toFilePath();
|
|
Map<String, dynamic> json;
|
|
try {
|
|
json = jsonDecode(File(path).readAsStringSync());
|
|
} catch (e) {
|
|
print("The test matrix at $path is not valid JSON!\n\n$e");
|
|
return;
|
|
}
|
|
try {
|
|
TestMatrix.fromJson(json);
|
|
} catch (e) {
|
|
print("The test matrix at $path is invalid!\n\n$e");
|
|
return;
|
|
}
|
|
}
|