mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
44f3881be6
This is the first checked-in SDK with null-safety enabled by default. Change-Id: I8f6fcdfd8856483f4737eb200ed4623a244cb0cd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170085 Reviewed-by: Leaf Petersen <leafp@google.com> Commit-Queue: Alexander Thomas <athom@google.com>
28 lines
813 B
Dart
28 lines
813 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.
|
|
|
|
// @dart = 2.9
|
|
|
|
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();
|
|
var 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;
|
|
}
|
|
}
|