INNER CODE UNIT · Dart

LegacyTestMover

dart-archive/linter · tool/move_legacy_test.dart:21

class LegacyTestMover {
  final String ruleName;

  LegacyTestMover(this.ruleName);

  void move() {
    var legacyTest = File('test_data/rules/$ruleName.dart');
    if (!legacyTest.existsSync()) {
      print('Did not find ${legacyTest.path}!!');
      return;
    }

    var newTest = File('test/rules/${ruleName}_test.dart');
    var newTestExists = newTest.existsSync();

    var legacyLines = legacyTest.readAsLinesSync();

    var snippets = gatherSnippets(legacyLines);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…