Files
sdk/pkg/dartdev/test/sdk_test.dart
T
Siva Annamalai 1e624b8122 Reland "[SDK] Reland : Switch dart2js to an AOT snapshot."
This reverts commit ceba7a5e65.

Reason for revert: Flutter tools has been fixed to use 'compile js' option instead of directly naming the snapshot.

Original change's description:
> Revert "[SDK] Reland : Switch dart2js to an AOT snapshot."
>
> This reverts commit 9fec00aeed.
>
> Reason for revert: flutter tools needs an update to use the 'compile js' command instead of reaching into the dart-sdk and using snapshot names (see https://github.com/flutter/flutter/issues/156654)
>
> Original change's description:
> > [SDK] Reland : Switch dart2js to an AOT snapshot.
> >
> > TESTS=ci
> >
> > Change-Id: I8c9f9d01cb462d1027c7a6a6521f40946fc7638b
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388071
> > Reviewed-by: Ben Konyi <bkonyi@google.com>
> > Commit-Queue: Siva Annamalai <asiva@google.com>
>
> Change-Id: I72bd9ad731b2b60d154c1e6477cce913d72acec4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390020
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: I15a9dc3092e436cdcb0fa84c8e7ddd1dac195074
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390620
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2024-10-16 20:05:10 +00:00

55 lines
1.3 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', () {
expectSnapshotExists(Sdk().ddsAotSnapshot, Sdk().ddsSnapshot);
});
test('dart2js snapshot', () {
expectSnapshotExists(Sdk().dart2jsAotSnapshot, Sdk().dart2jsSnapshot);
});
}
void _runtime() {
test('channel', () {
final runtime = Runtime.runtime;
expect(runtime.channel, isNotEmpty);
});
}
void expectFileExists(String path) {
expect(File(path).existsSync(), isTrue);
}
void expectSnapshotExists(String aotpath, String jitpath) {
expect(File(aotpath).existsSync() || File(jitpath).existsSync(), isTrue);
}
void expectDirectoryExists(String path) {
expect(Directory(path).existsSync(), isTrue);
}