Files
sdk/tools/testing/dart/repository.dart
T
Bob Nystrom ba2e4aff24 Some minor clean-up in test.dart.
- Fix fuzzy arrow errors.
- Default the Dart repo URI so it doesn't always need to be explicitly
  set.
- Run dartfmt on everything.
- Move some members out of the garbage bin "TestUtils" class:
  - Move the stuff around the Dart repo directory to a new Repository
    class.
  - Move absolute() into Path where it belongs.
  - Move workingDirectory in Path since it is a Path.
  - Delete the random number stuff since it was apparently unused.

Change-Id: I3dab3a4f1713b7a749e64b6776149d05a0ce1b69
Reviewed-on: https://dart-review.googlesource.com/14502
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2017-10-19 19:05:58 +00:00

20 lines
780 B
Dart

// Copyright (c) 2011, 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.
import 'dart:io';
import 'path.dart';
/// Provides information about the surrounding Dart repository.
class Repository {
/// File path pointing to the root directory of the Dart checkout.
static Path get dir => new Path(uri.toFilePath());
/// The URI pointing to the root of the Dart checkout.
///
/// If not explicitly set, defaults to the directory three levels above the
/// script being executed, which is assumed to be one of the test scripts in
/// this same directory as this file.
static Uri uri = Platform.script.resolve('../../..');
}