353b04f96e
Change-Id: I0e3ff1b9e507c48251d1b3588c86365052996d72 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138020 Reviewed-by: Jaime Wren <jwren@google.com> Commit-Queue: Devon Carew <devoncarew@google.com>
47 lines
976 B
Dart
47 lines
976 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.
|
|
|
|
import 'dart:io';
|
|
|
|
import 'package:dartdev/src/sdk.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
group('Sdk', _sdk);
|
|
}
|
|
|
|
void _sdk() {
|
|
test('can locate', () {
|
|
expectDirectoryExists(Sdk().dir);
|
|
});
|
|
|
|
test('sdkPath', () {
|
|
expectDirectoryExists(Sdk().sdkPath);
|
|
});
|
|
|
|
test('dart binary', () {
|
|
expectFileExists(Sdk().dart);
|
|
});
|
|
|
|
test('analysis_server_snapshot', () {
|
|
expectFileExists(Sdk().analysis_server_snapshot);
|
|
});
|
|
|
|
test('dartfmt', () {
|
|
expectFileExists(Sdk().dartfmt);
|
|
});
|
|
|
|
test('pub', () {
|
|
expectFileExists(Sdk().pub);
|
|
});
|
|
}
|
|
|
|
void expectFileExists(String path) {
|
|
expect(File(path).existsSync(), isTrue);
|
|
}
|
|
|
|
void expectDirectoryExists(String path) {
|
|
expect(Directory(path).existsSync(), isTrue);
|
|
}
|