Files
sdk/pkg/dartdev/test/sdk_test.dart
T
asiva ab44b20ab8 Reapply "[VM/dartdev] Switch dartdev to use an AOT runtime." and
Add the fixes that were done after original CL landed.

This reverts commit 97bc401163.

TEST=ci

Change-Id: I26373aecc325e4c0c379c92e779aa301e3a58c5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/441700
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2025-07-24 14:48:03 -07:00

51 lines
1.1 KiB
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);
group('Runtime', _runtime);
}
void _sdk() {
test('sdkPath', () {
expectDirectoryExists(Sdk().sdkPath);
});
test('dart binary', () {
expectFileExists(Sdk().dart);
});
test('analysis_server snapshot', () {
expectFileExists(Sdk().analysisServerSnapshot);
});
test('dds snapshot', () {
expectFileExists(Sdk().ddsAotSnapshot);
});
test('dart2js snapshot', () {
expectFileExists(Sdk().dart2jsAotSnapshot);
});
}
void _runtime() {
test('channel', () {
final runtime = Runtime.runtime;
expect(runtime.channel, isNotEmpty);
});
}
void expectFileExists(String path) {
expect(File(path).existsSync(), isTrue);
}
void expectDirectoryExists(String path) {
expect(Directory(path).existsSync(), isTrue);
}