[dartdevc] Migrate tests/compiler/dartdevc_native to tests/dartdevc_2.
Change-Id: I9c486f29f3bcf8a6ecf481eb25ea61d0468049b2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150667 Commit-Queue: Joshua Litt <joshualitt@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
fd1556c1e4
commit
d14ab0779a
+1
-1
@@ -35,7 +35,7 @@
|
||||
'filepath': (
|
||||
'^pkg/dev_compiler|'
|
||||
'^sdk/lib/_internal/js_dev_runtime|'
|
||||
'^tests/compiler/dartdevc_native'
|
||||
'^tests/dartdevc'
|
||||
)
|
||||
},
|
||||
'package_vm': {
|
||||
|
||||
@@ -107,7 +107,7 @@ class DevCompilerTarget extends Target {
|
||||
if (uri.scheme == 'dev-dart-app') return true;
|
||||
|
||||
var scriptName = uri.path;
|
||||
return scriptName.contains('tests/compiler/dartdevc_native');
|
||||
return scriptName.contains('tests/dartdevc');
|
||||
}
|
||||
|
||||
bool _allowedDartLibrary(Uri uri) => uri.scheme == 'dart';
|
||||
|
||||
@@ -32,11 +32,12 @@ final testSuiteDirectories = [
|
||||
Path('runtime/observatory/tests/observatory_ui'),
|
||||
Path('samples'),
|
||||
Path('samples-dev'),
|
||||
Path('tests/compiler/dartdevc_native'),
|
||||
Path('tests/corelib'),
|
||||
Path('tests/corelib_2'),
|
||||
Path('tests/dart2js'),
|
||||
Path('tests/dart2js_2'),
|
||||
Path('tests/dartdevc'),
|
||||
Path('tests/dartdevc_2'),
|
||||
Path('tests/kernel'),
|
||||
Path('tests/language'),
|
||||
Path('tests/language_2'),
|
||||
|
||||
+2
-2
@@ -129,7 +129,7 @@ main() async {
|
||||
// Cache blocker is a workaround for:
|
||||
// https://code.google.com/p/dart/issues/detail?id=11834
|
||||
var cacheBlocker = new DateTime.now().millisecondsSinceEpoch;
|
||||
var goldenUrl = '/root_dart/tests/compiler/dartdevc_native/debugger/'
|
||||
var goldenUrl = '/root_dart/tests/dartdevc_2/debugger/'
|
||||
'debugger_test_golden.txt?cacheBlock=$cacheBlocker';
|
||||
|
||||
String golden;
|
||||
@@ -326,7 +326,7 @@ window.ExampleJSClass = function ExampleJSClass(x) {
|
||||
if (actualStr != golden) {
|
||||
var helpMessage =
|
||||
'Debugger output does not match the golden data found in:\n'
|
||||
'tests/compiler/dartdevc_native/debugger/debugger_test_golden.txt\n'
|
||||
'tests/dartdevc_2/debugger/debugger_test_golden.txt\n'
|
||||
'The new golden data is copied to the clipboard when you click on '
|
||||
'this window.\n'
|
||||
'Please update the golden file with the following output and review '
|
||||
@@ -0,0 +1,51 @@
|
||||
// Copyright (c) 2019, 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:_runtime' show gFnType, typeRep, isSubtypeOf;
|
||||
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
/// Returns an unwrapped generic function type with a bounded type argument in
|
||||
/// the form: <T extends [bound]> void -> void.
|
||||
///
|
||||
// TODO(nshahan): The generic function type is created as a legacy type.
|
||||
genericFunction(bound) => gFnType((T) => [typeRep<void>(), []], (T) => [bound]);
|
||||
|
||||
/// Returns an unwrapped generic function type with a bounded type argument in
|
||||
/// the form: <T extends [bound]> [argumentType] -> T.
|
||||
///
|
||||
// TODO(nshahan): The generic function type is created as a legacy type.
|
||||
functionGenericReturn(bound, argumentType) => gFnType(
|
||||
(T) => [
|
||||
T,
|
||||
[argumentType]
|
||||
],
|
||||
(T) => [bound]);
|
||||
|
||||
/// Returns an unwrapped generic function type with a bounded type argument in
|
||||
/// the form: <T extends [bound]> T -> [returnType].
|
||||
///
|
||||
// TODO(nshahan): The generic function type is created as a legacy type.
|
||||
functionGenericArg(bound, returnType) => gFnType(
|
||||
(T) => [
|
||||
returnType,
|
||||
[T]
|
||||
],
|
||||
(T) => [bound]);
|
||||
|
||||
void checkSubtype(s, t) =>
|
||||
Expect.isTrue(isSubtypeOf(s, t), '$s should be subtype of $t.');
|
||||
|
||||
void checkProperSubtype(s, t) {
|
||||
Expect.isTrue(isSubtypeOf(s, t), '$s should be subtype of $t.');
|
||||
checkSubtypeFailure(t, s);
|
||||
}
|
||||
|
||||
void checkMutualSubtype(Object s, Object t) {
|
||||
Expect.isTrue(isSubtypeOf(s, t), '$s should be subtype of $t.');
|
||||
Expect.isTrue(isSubtypeOf(t, s), '$t should be subtype of $s.');
|
||||
}
|
||||
|
||||
void checkSubtypeFailure(s, t) =>
|
||||
Expect.isFalse(isSubtypeOf(s, t), '$s should not be subtype of $t.');
|
||||
+13
-11
@@ -42,9 +42,9 @@
|
||||
"tests/co19/co19-dartdevc.status",
|
||||
"tests/co19/co19-kernel.status",
|
||||
"tests/co19/co19-runtime.status",
|
||||
"tests/compiler/",
|
||||
"tests/corelib_2/",
|
||||
"tests/dart2js_2/",
|
||||
"tests/dartdevc_2/",
|
||||
"tests/kernel/",
|
||||
"tests/language/",
|
||||
"tests/language_2/",
|
||||
@@ -83,9 +83,9 @@
|
||||
"tests/co19/co19-dartdevc.status",
|
||||
"tests/co19/co19-kernel.status",
|
||||
"tests/co19/co19-runtime.status",
|
||||
"tests/compiler/",
|
||||
"tests/corelib/",
|
||||
"tests/dart2js/",
|
||||
"tests/dartdevc/",
|
||||
"tests/kernel/",
|
||||
"tests/language/",
|
||||
"tests/language_2/",
|
||||
@@ -131,9 +131,9 @@
|
||||
"tests/co19_2/co19_2-dartdevc.status",
|
||||
"tests/co19_2/co19_2-kernel.status",
|
||||
"tests/co19_2/co19_2-runtime.status",
|
||||
"tests/compiler/",
|
||||
"tests/corelib_2/",
|
||||
"tests/dart2js_2/",
|
||||
"tests/dartdevc_2/",
|
||||
"tests/kernel/",
|
||||
"tests/language/",
|
||||
"tests/language_2/",
|
||||
@@ -175,9 +175,9 @@
|
||||
"tests/co19/co19-dartdevc.status",
|
||||
"tests/co19/co19-kernel.status",
|
||||
"tests/co19/co19-runtime.status",
|
||||
"tests/compiler/",
|
||||
"tests/corelib/",
|
||||
"tests/dart2js/",
|
||||
"tests/dartdevc/",
|
||||
"tests/kernel/",
|
||||
"tests/language/",
|
||||
"tests/language_2/",
|
||||
@@ -219,11 +219,12 @@
|
||||
"tests/co19_2/co19_2-dartdevc.status",
|
||||
"tests/co19_2/co19_2-kernel.status",
|
||||
"tests/co19_2/co19_2-runtime.status",
|
||||
"tests/compiler/",
|
||||
"tests/corelib/",
|
||||
"tests/corelib_2/",
|
||||
"tests/dart2js/",
|
||||
"tests/dart2js_2/",
|
||||
"tests/dartdevc/",
|
||||
"tests/dartdevc_2/",
|
||||
"tests/kernel/",
|
||||
"tests/language/",
|
||||
"tests/language_2/",
|
||||
@@ -328,11 +329,12 @@
|
||||
"tests/co19_2/co19_2-dartdevc.status",
|
||||
"tests/co19_2/co19_2-kernel.status",
|
||||
"tests/co19_2/co19_2-runtime.status",
|
||||
"tests/compiler/",
|
||||
"tests/corelib/",
|
||||
"tests/corelib_2/",
|
||||
"tests/dart2js/",
|
||||
"tests/dart2js_2/",
|
||||
"tests/dartdevc",
|
||||
"tests/dartdevc_2",
|
||||
"tests/kernel/",
|
||||
"tests/language/",
|
||||
"tests/language_2/",
|
||||
@@ -1924,7 +1926,7 @@
|
||||
"language_2",
|
||||
"corelib_2",
|
||||
"lib_2",
|
||||
"dartdevc_native"
|
||||
"dartdevc_2"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2008,7 +2010,7 @@
|
||||
"language_2",
|
||||
"corelib_2",
|
||||
"lib_2",
|
||||
"dartdevc_native"
|
||||
"dartdevc_2"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2054,7 +2056,7 @@
|
||||
"language",
|
||||
"corelib",
|
||||
"lib",
|
||||
"dartdevc_native"
|
||||
"dartdevc"
|
||||
],
|
||||
"shards": 5,
|
||||
"fileset": "web_platform_nnbd"
|
||||
@@ -2075,7 +2077,7 @@
|
||||
"language",
|
||||
"corelib",
|
||||
"lib",
|
||||
"dartdevc_native"
|
||||
"dartdevc"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2110,7 +2112,7 @@
|
||||
"language_2",
|
||||
"corelib_2",
|
||||
"lib_2",
|
||||
"dartdevc_native"
|
||||
"dartdevc_2"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user