Files
sdk/pkg/status_file/test/parse_and_normalize_test.dart
T
Robert Nystrom 1e5aebc601 Reformat pkg/status_file.
I was starting to migrate it to use primary constructors but realized
the formatting was out of date, so I figured I may as well fix that
first so that the migration CL is easier to read.

There are no changes in this CL, I only ran `dart format .`.

Change-Id: I25f772ce0e0a00d83f1f8b561fc8bb9fe9486859
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506741
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2026-05-27 14:43:43 -07:00

32 lines
981 B
Dart

// Copyright (c) 2017, 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.
/// Tests that every .status file in the Dart repository can be successfully
/// parsed.
library;
import 'dart:io';
import 'package:status_file/canonical_status_file.dart';
final Uri repoRoot = Platform.script.resolve("../../../");
void main() {
// Parse every status file in the repository.
for (var directory in ["tests", "runtime/tests"]) {
for (var entry in Directory.fromUri(
repoRoot.resolve(directory),
).listSync(recursive: true)) {
if (!entry.path.endsWith(".status")) continue;
try {
var statusFile = StatusFile.read(entry.path);
statusFile.toString();
} catch (err, st) {
print(err);
print(st);
throw Exception("Could not parse '${entry.path}'.\n$err");
}
}
}
}