mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
Revert "Fix orphaned files in tests/language/ and tests/language_2/."
This reverts commit 1989b7f376
.
Reason for revert: Bots are sad, red, and purple
Original change's description:
> Fix orphaned files in tests/language/ and tests/language_2/.
>
> Some of these should be tests but were missing "_test". Others seemed
> to simply be dead code. Some should have been referenced but there were
> mistakes in the imports in other files.
>
> Change-Id: If6f1d9e52a4babbf9883ddd437fc3091179f2ef2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198141
> Auto-Submit: Bob Nystrom <rnystrom@google.com>
> Commit-Queue: Bob Nystrom <rnystrom@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
TBR=lrn@google.com,leafp@google.com,rnystrom@google.com
Change-Id: I8d63af684023e99849addf9d1c3f87d6bcfbe89d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200531
Reviewed-by: Ben Konyi <bkonyi@google.com>
This commit is contained in:
parent
dd18a07c75
commit
d7ccc3ca6a
53 changed files with 290 additions and 71 deletions
|
@ -7,6 +7,7 @@ import '../../common_elements.dart' show ElementEnvironment;
|
|||
import '../../deferred_load.dart'
|
||||
show ImportDescription, OutputUnit, OutputUnitData, deferredPartFileName;
|
||||
import '../../elements/entities.dart';
|
||||
import '../../deferred_load.dart' show OutputUnit;
|
||||
import '../../js/js.dart' as js;
|
||||
import '../../options.dart';
|
||||
import '../model.dart';
|
||||
|
|
|
@ -15,10 +15,6 @@ import "package:expect/expect.dart";
|
|||
import 'built_in_prefix_library_async.dart' as async;
|
||||
import 'built_in_prefix_library_await.dart' as await;
|
||||
import 'built_in_prefix_library_hide.dart' as hide;
|
||||
import 'built_in_prefix_library_library.dart' as library;
|
||||
// ^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
|
||||
// [cfe] Can't use 'library' as a name here.
|
||||
import 'built_in_prefix_library_of.dart' as of;
|
||||
import 'built_in_prefix_library_on.dart' as on;
|
||||
import 'built_in_prefix_library_show.dart' as show;
|
||||
|
@ -26,44 +22,52 @@ import 'built_in_prefix_library_sync.dart' as sync;
|
|||
import 'built_in_prefix_library_yield.dart' as yield;
|
||||
|
||||
async<dynamic> _async = new async.A();
|
||||
// [error line 28, column 1, length 5]
|
||||
// [error line 24, column 1, length 5]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'async' isn't a type.
|
||||
// [error line 24, column 1]
|
||||
// [cfe] Expected 0 type arguments.
|
||||
await<dynamic> _await = new await.A();
|
||||
// [error line 33, column 1, length 5]
|
||||
// [error line 30, column 1, length 5]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'await' isn't a type.
|
||||
// [error line 30, column 1]
|
||||
// [cfe] Expected 0 type arguments.
|
||||
hide<dynamic> _hide = new hide.A();
|
||||
// [error line 38, column 1, length 4]
|
||||
// [error line 36, column 1, length 4]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'hide' isn't a type.
|
||||
// [error line 36, column 1]
|
||||
// [cfe] Expected 0 type arguments.
|
||||
of<dynamic> _of = new of.A();
|
||||
// [error line 43, column 1, length 2]
|
||||
// [error line 42, column 1, length 2]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'of' isn't a type.
|
||||
// [error line 42, column 1]
|
||||
// [cfe] Expected 0 type arguments.
|
||||
on<dynamic> _on = new on.A();
|
||||
// [error line 48, column 1, length 2]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'on' isn't a type.
|
||||
// [error line 48, column 1]
|
||||
// [cfe] Expected 0 type arguments.
|
||||
show<dynamic> _show = new show.A();
|
||||
// [error line 53, column 1, length 4]
|
||||
// [error line 54, column 1, length 4]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'show' isn't a type.
|
||||
// [error line 54, column 1]
|
||||
// [cfe] Expected 0 type arguments.
|
||||
sync<dynamic> _sync = new sync.A();
|
||||
// [error line 58, column 1, length 4]
|
||||
// [error line 60, column 1, length 4]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'sync' isn't a type.
|
||||
// [error line 60, column 1]
|
||||
// [cfe] Expected 0 type arguments.
|
||||
yield<dynamic> _yield = new yield.A();
|
||||
// [error line 63, column 1, length 5]
|
||||
// [error line 66, column 1, length 5]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'yield' isn't a type.
|
||||
// [error line 66, column 1]
|
||||
// [cfe] Expected 0 type arguments.
|
||||
|
||||
async.B<async> _B_async = new async.B();
|
||||
|
@ -103,41 +107,49 @@ async.B<async<dynamic>> _B2_async = new async.B();
|
|||
// ^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
|
||||
// [cfe] 'async' isn't a type.
|
||||
// ^
|
||||
// [cfe] Expected 0 type arguments.
|
||||
await.B<await<dynamic>> _B2_await = new await.B();
|
||||
// ^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
|
||||
// [cfe] 'await' isn't a type.
|
||||
// ^
|
||||
// [cfe] Expected 0 type arguments.
|
||||
hide.B<hide<dynamic>> _B2_hide = new hide.B();
|
||||
// ^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
|
||||
// [cfe] 'hide' isn't a type.
|
||||
// ^
|
||||
// [cfe] Expected 0 type arguments.
|
||||
of.B<of<dynamic>> _B2_of = new of.B();
|
||||
// ^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
|
||||
// [cfe] 'of' isn't a type.
|
||||
// ^
|
||||
// [cfe] Expected 0 type arguments.
|
||||
on.B<on<dynamic>> _B2_on = new on.B();
|
||||
// ^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
|
||||
// [cfe] 'on' isn't a type.
|
||||
// ^
|
||||
// [cfe] Expected 0 type arguments.
|
||||
show.B<show<dynamic>> _B2_show = new show.B();
|
||||
// ^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
|
||||
// [cfe] 'show' isn't a type.
|
||||
// ^
|
||||
// [cfe] Expected 0 type arguments.
|
||||
sync.B<sync<dynamic>> _B2_sync = new sync.B();
|
||||
// ^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
|
||||
// [cfe] 'sync' isn't a type.
|
||||
// ^
|
||||
// [cfe] Expected 0 type arguments.
|
||||
yield.B<yield<dynamic>> _B2_yield = new yield.B();
|
||||
// ^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT
|
||||
// [cfe] 'yield' isn't a type.
|
||||
// ^
|
||||
// [cfe] Expected 0 type arguments.
|
||||
|
||||
main() {
|
||||
|
|
10
tests/language/library/a.dart
Normal file
10
tests/language/library/a.dart
Normal file
|
@ -0,0 +1,10 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
library libraryA.dart;
|
||||
|
||||
import "c.dart";
|
||||
|
||||
var fooA = fooC;
|
10
tests/language/library/b.dart
Normal file
10
tests/language/library/b.dart
Normal file
|
@ -0,0 +1,10 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
library libraryB.dart;
|
||||
|
||||
import "c.dart";
|
||||
|
||||
var fooB = fooC;
|
8
tests/language/library/c.dart
Normal file
8
tests/language/library/c.dart
Normal file
|
@ -0,0 +1,8 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
library libraryC.dart;
|
||||
|
||||
var fooC = 10;
|
10
tests/language/library/d.dart
Normal file
10
tests/language/library/d.dart
Normal file
|
@ -0,0 +1,10 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
library libraryD.dart;
|
||||
|
||||
import "f.dart";
|
||||
|
||||
var fooD = fooC;
|
11
tests/language/library/e.dart
Normal file
11
tests/language/library/e.dart
Normal file
|
@ -0,0 +1,11 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
library libraryE.dart;
|
||||
|
||||
import "c.dart";
|
||||
import "f.dart";
|
||||
|
||||
var fooE = 0;
|
8
tests/language/library/f.dart
Normal file
8
tests/language/library/f.dart
Normal file
|
@ -0,0 +1,8 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
library libraryF.dart;
|
||||
|
||||
var fooC = 10;
|
8
tests/language/library/library3.dart
Normal file
8
tests/language/library/library3.dart
Normal file
|
@ -0,0 +1,8 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
library library3.dart;
|
||||
|
||||
import "../library2.dart"; // defines "foo" and "foo1".
|
11
tests/language/library/library4.dart
Normal file
11
tests/language/library/library4.dart
Normal file
|
@ -0,0 +1,11 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
library library4.dart;
|
||||
|
||||
import "../library2.dart"; // defines "foo" and "foo1".
|
||||
|
||||
var foo;
|
||||
var foo1 = 0;
|
|
@ -2,6 +2,7 @@
|
|||
// 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.
|
||||
|
||||
|
||||
// Test that it is not a compile time error for a `final` variable to not have
|
||||
// an initializer if that variable is declared as `late`.
|
||||
import 'package:expect/expect.dart';
|
|
@ -24,6 +24,6 @@ void main() {
|
|||
}
|
||||
}
|
||||
// ^
|
||||
// [analyzer] unspecified
|
||||
// [cfe] unspecified
|
||||
// [analyzer] undefined
|
||||
// [cfe] undefined
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
// Requirements=nnbd-weak
|
||||
|
||||
|
||||
import 'infer_aliased_factory_invocation_07_lib.dart';
|
||||
import 'infer_aliased_factory_invocation_06_lib.dart';
|
||||
|
||||
Type typeOf<X>() => X;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
library PrefixTest;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import "new_test1.dart";
|
||||
import "test1.dart";
|
||||
|
||||
main() {
|
||||
Expect.equals(Prefix.getSource(), Prefix.getImport() + 1);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
library PrefixTest1;
|
||||
|
||||
import "new_test2.dart" as test2;
|
||||
import "test2.dart" as test2;
|
||||
|
||||
class Prefix {
|
||||
static const int foo = 43;
|
||||
|
|
7
tests/language/script/source.dart
Normal file
7
tests/language/script/source.dart
Normal file
|
@ -0,0 +1,7 @@
|
|||
// 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.
|
||||
|
||||
// A perfectly legal dart source file for use with script and library tests.
|
||||
|
||||
const int script_source = 1;
|
7
tests/language/top_level/file3.dart
Normal file
7
tests/language/top_level/file3.dart
Normal file
|
@ -0,0 +1,7 @@
|
|||
// 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.
|
||||
|
||||
main() {
|
||||
Expect.equals(42, prefix.topLevelVar);
|
||||
}
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
const int? gx =
|
||||
const int gx =
|
||||
const bool.hasEnvironment("x") ? const int.fromEnvironment("x") : null;
|
||||
|
||||
class A {
|
||||
final int? x = gx;
|
||||
final int? y =
|
||||
final int x = gx;
|
||||
final int y =
|
||||
const bool.hasEnvironment("y") ? const int.fromEnvironment("y") : null;
|
||||
const A();
|
||||
}
|
|
@ -2,8 +2,6 @@
|
|||
// 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.
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--optimization_counter_threshold=1
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
@ -530,7 +528,8 @@ class X0 {
|
|||
57: var4,
|
||||
73: var7[-43],
|
||||
38: var0
|
||||
}).isNotEmpty ||
|
||||
})
|
||||
.isNotEmpty ||
|
||||
({
|
||||
67: var4,
|
||||
14: 'M\u{1f600}1HNbP',
|
||||
|
@ -538,7 +537,8 @@ class X0 {
|
|||
85: 'uyq',
|
||||
95: var7[(-(Int32x4.wwxw))],
|
||||
33: ''
|
||||
}).isNotEmpty))
|
||||
})
|
||||
.isNotEmpty))
|
||||
: false)
|
||||
? var2
|
||||
: (++var2))
|
||||
|
@ -557,7 +557,8 @@ class X0 {
|
|||
51: '-8ht',
|
||||
26: ('(2l3\u2665h' ?? var0),
|
||||
79: var4
|
||||
}).isNotEmpty
|
||||
})
|
||||
.isNotEmpty
|
||||
? var5[(var2 % loc0)]
|
||||
: var2) %
|
||||
((!(NetworkInterface.listSupported))
|
||||
|
@ -1565,8 +1566,7 @@ class X2 extends X0 with X1 {
|
|||
|
||||
class X3 extends X1 {
|
||||
Map<int, String> fld3_0 = {
|
||||
if (true)
|
||||
if (false) 45: 'ynEn\u2665nG' else 70: 'c\u{1f600}mN4\u2665a',
|
||||
if (true) if (false) 45: 'ynEn\u2665nG' else 70: 'c\u{1f600}mN4\u2665a',
|
||||
if (true) 30: '6\u2665P!Pbi',
|
||||
81: 't',
|
||||
82: '17fx#!',
|
||||
|
@ -1738,7 +1738,8 @@ class X3 extends X1 {
|
|||
7: par3,
|
||||
69: Uri.decodeFull(
|
||||
(foo1_3() + 'LX+'))
|
||||
}).isEmpty)
|
||||
})
|
||||
.isEmpty)
|
||||
? (~((13 | 64)))
|
||||
: (-(var2)))),
|
||||
(par1--),
|
||||
|
@ -1793,7 +1794,8 @@ class X3 extends X1 {
|
|||
4: 'pUc(q',
|
||||
15: 'K\u{1f600}hmdZ\u2665',
|
||||
95: (var1 ? var4 : (var1 ? fld3_0[-45] : foo1_3()))
|
||||
}).isNotEmpty
|
||||
})
|
||||
.isNotEmpty
|
||||
? ((var1 ? var1 : (var1 ? var1 : foo3_0(var3))) ||
|
||||
foo3_0(var3))
|
||||
: (!(((false || true) ? var1 : false))))
|
||||
|
@ -1991,7 +1993,8 @@ class X3 extends X1 {
|
|||
95: '\u{1f600}2tIYqE',
|
||||
43: (true ? 'baf-\u2665' : var4),
|
||||
30: var7[(-((-68 % ZLibOption.defaultLevel)))]
|
||||
})).isNotEmpty))
|
||||
}))
|
||||
.isNotEmpty))
|
||||
-13
|
||||
else
|
||||
(var1 ? (-((-(var5[56])))) : (var2--)),
|
||||
|
@ -2153,7 +2156,8 @@ class X3 extends X1 {
|
|||
? ((var2--) ?? fld3_2)
|
||||
: var5[(fld3_2--)])],
|
||||
52: '(('
|
||||
}).isEmpty)))
|
||||
})
|
||||
.isEmpty)))
|
||||
? fld3_0
|
||||
: {
|
||||
39: foo1_3(),
|
|
@ -10,7 +10,7 @@
|
|||
import 'package:expect/expect.dart';
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
bool foo(dynamic x) => x < 10;
|
||||
bool foo(int x) => x < 10;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
bool bar(bool f) => f && foo(1);
|
|
@ -17,10 +17,6 @@ import "package:expect/expect.dart";
|
|||
import 'built_in_prefix_library_async.dart' as async;
|
||||
import 'built_in_prefix_library_await.dart' as await;
|
||||
import 'built_in_prefix_library_hide.dart' as hide;
|
||||
import 'built_in_prefix_library_library.dart' as library;
|
||||
// ^^^^^^^
|
||||
// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION
|
||||
// [cfe] Can't use 'library' as a name here.
|
||||
import 'built_in_prefix_library_of.dart' as of;
|
||||
import 'built_in_prefix_library_on.dart' as on;
|
||||
import 'built_in_prefix_library_show.dart' as show;
|
||||
|
@ -28,42 +24,42 @@ import 'built_in_prefix_library_sync.dart' as sync;
|
|||
import 'built_in_prefix_library_yield.dart' as yield;
|
||||
|
||||
async<dynamic> _async = new async.A();
|
||||
// [error line 30, column 1, length 5]
|
||||
// [error line 26, column 1, length 5]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'async' isn't a type.
|
||||
// [cfe] Expected 0 type arguments.
|
||||
await<dynamic> _await = new await.A();
|
||||
// [error line 35, column 1, length 5]
|
||||
// [error line 31, column 1, length 5]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'await' isn't a type.
|
||||
// [cfe] Expected 0 type arguments.
|
||||
hide<dynamic> _hide = new hide.A();
|
||||
// [error line 40, column 1, length 4]
|
||||
// [error line 36, column 1, length 4]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'hide' isn't a type.
|
||||
// [cfe] Expected 0 type arguments.
|
||||
of<dynamic> _of = new of.A();
|
||||
// [error line 45, column 1, length 2]
|
||||
// [error line 41, column 1, length 2]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'of' isn't a type.
|
||||
// [cfe] Expected 0 type arguments.
|
||||
on<dynamic> _on = new on.A();
|
||||
// [error line 50, column 1, length 2]
|
||||
// [error line 46, column 1, length 2]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'on' isn't a type.
|
||||
// [cfe] Expected 0 type arguments.
|
||||
show<dynamic> _show = new show.A();
|
||||
// [error line 55, column 1, length 4]
|
||||
// [error line 51, column 1, length 4]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'show' isn't a type.
|
||||
// [cfe] Expected 0 type arguments.
|
||||
sync<dynamic> _sync = new sync.A();
|
||||
// [error line 60, column 1, length 4]
|
||||
// [error line 56, column 1, length 4]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'sync' isn't a type.
|
||||
// [cfe] Expected 0 type arguments.
|
||||
yield<dynamic> _yield = new yield.A();
|
||||
// [error line 65, column 1, length 5]
|
||||
// [error line 61, column 1, length 5]
|
||||
// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE
|
||||
// [cfe] 'yield' isn't a type.
|
||||
// [cfe] Expected 0 type arguments.
|
||||
|
|
12
tests/language_2/library/a.dart
Normal file
12
tests/language_2/library/a.dart
Normal file
|
@ -0,0 +1,12 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
library libraryA.dart;
|
||||
|
||||
import "c.dart";
|
||||
|
||||
var fooA = fooC;
|
12
tests/language_2/library/b.dart
Normal file
12
tests/language_2/library/b.dart
Normal file
|
@ -0,0 +1,12 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
library libraryB.dart;
|
||||
|
||||
import "c.dart";
|
||||
|
||||
var fooB = fooC;
|
10
tests/language_2/library/c.dart
Normal file
10
tests/language_2/library/c.dart
Normal file
|
@ -0,0 +1,10 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
library libraryC.dart;
|
||||
|
||||
var fooC = 10;
|
12
tests/language_2/library/d.dart
Normal file
12
tests/language_2/library/d.dart
Normal file
|
@ -0,0 +1,12 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
library libraryD.dart;
|
||||
|
||||
import "f.dart";
|
||||
|
||||
var fooD = fooC;
|
13
tests/language_2/library/e.dart
Normal file
13
tests/language_2/library/e.dart
Normal file
|
@ -0,0 +1,13 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
library libraryE.dart;
|
||||
|
||||
import "c.dart";
|
||||
import "f.dart";
|
||||
|
||||
var fooE = 0;
|
10
tests/language_2/library/f.dart
Normal file
10
tests/language_2/library/f.dart
Normal file
|
@ -0,0 +1,10 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
library libraryF.dart;
|
||||
|
||||
var fooC = 10;
|
10
tests/language_2/library/library3.dart
Normal file
10
tests/language_2/library/library3.dart
Normal file
|
@ -0,0 +1,10 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
library library3.dart;
|
||||
|
||||
import "../library2.dart"; // defines "foo" and "foo1".
|
13
tests/language_2/library/library4.dart
Normal file
13
tests/language_2/library/library4.dart
Normal file
|
@ -0,0 +1,13 @@
|
|||
// 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.
|
||||
//
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
library library4.dart;
|
||||
|
||||
import "../library2.dart"; // defines "foo" and "foo1".
|
||||
|
||||
var foo;
|
||||
var foo1 = 0;
|
|
@ -7,7 +7,7 @@
|
|||
library PrefixTest;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import "new_test1.dart";
|
||||
import "test1.dart";
|
||||
|
||||
main() {
|
||||
Expect.equals(Prefix.getSource(), Prefix.getImport() + 1);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
library PrefixTest1;
|
||||
|
||||
import "new_test2.dart" as test2;
|
||||
import "test2.dart" as test2;
|
||||
|
||||
class Prefix {
|
||||
static const int foo = 43;
|
||||
|
|
9
tests/language_2/script/source.dart
Normal file
9
tests/language_2/script/source.dart
Normal file
|
@ -0,0 +1,9 @@
|
|||
// 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.
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
// A perfectly legal dart source file for use with script and library tests.
|
||||
|
||||
const int script_source = 1;
|
9
tests/language_2/top_level/file3.dart
Normal file
9
tests/language_2/top_level/file3.dart
Normal file
|
@ -0,0 +1,9 @@
|
|||
// 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.
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
main() {
|
||||
Expect.equals(42, prefix.topLevelVar);
|
||||
}
|
|
@ -2,6 +2,8 @@
|
|||
// 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.
|
||||
|
||||
// @dart = 2.9
|
||||
|
||||
// VMOptions=--optimization_counter_threshold=1
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
@ -9,9 +11,6 @@ import "package:expect/expect.dart";
|
|||
// Found by DartFuzzing: would sometimes crash on OSR
|
||||
// https://github.com/dart-lang/sdk/issues/38436
|
||||
|
||||
// Note: When this test was migrated to null safety, changed several type
|
||||
// annotations to dynamic to fix the hundreds of null safe errors. That was a
|
||||
// less invasive change than adding `?` and `!` throughout the test.
|
||||
import 'dart:async';
|
||||
import 'dart:cli';
|
||||
import 'dart:collection';
|
||||
|
@ -22,11 +21,11 @@ import 'dart:isolate';
|
|||
import 'dart:math';
|
||||
import 'dart:typed_data';
|
||||
|
||||
dynamic var0 = '';
|
||||
dynamic var1 = true;
|
||||
String var0 = '';
|
||||
bool var1 = true;
|
||||
int var2 = -30;
|
||||
double var3 = 0.895077679110543;
|
||||
dynamic var4 = '';
|
||||
String var4 = '';
|
||||
List<int> var5 = [55, -70];
|
||||
Set<int> var6 = {
|
||||
1024,
|
||||
|
@ -65,7 +64,7 @@ Set<int> var6 = {
|
|||
-25
|
||||
}
|
||||
};
|
||||
dynamic var7 = {
|
||||
Map<int, String> var7 = {
|
||||
6: '',
|
||||
...{56: 'B\u2665pwO', 73: 'ZJDi\u{1f600}m'},
|
||||
...{73: ')', 14: '93Q'},
|
||||
|
@ -88,7 +87,7 @@ Map<int, String> foo1(List<int> par1, bool par2) {
|
|||
throw ((-(var3)) * (-(0.943305664017911)));
|
||||
}
|
||||
|
||||
List<int> foo2(Set<int> par1, List<int> par2, dynamic par3) {
|
||||
List<int> foo2(Set<int> par1, List<int> par2, Map<int, String> par3) {
|
||||
switch (-49) {
|
||||
case 4149672951:
|
||||
{
|
||||
|
@ -201,9 +200,9 @@ List<int> foo2(Set<int> par1, List<int> par2, dynamic par3) {
|
|||
};
|
||||
} catch (exception, stackTrace) {
|
||||
/**
|
||||
** Multi-line
|
||||
** documentation comment.
|
||||
*/
|
||||
** Multi-line
|
||||
** documentation comment.
|
||||
*/
|
||||
for (int loc1 = 0; loc1 < 89; loc1++) {
|
||||
switch ((var2--)) {
|
||||
case 3807258589:
|
||||
|
@ -438,7 +437,7 @@ class X0 {
|
|||
-69
|
||||
};
|
||||
|
||||
List<int> foo0_0(dynamic par1) {
|
||||
List<int> foo0_0(Map<int, String> par1) {
|
||||
if ((var1 ? ((!(fld0_0)) ? true : false) : true)) {
|
||||
return ((var4).trim()).codeUnits;
|
||||
} else {
|
||||
|
@ -531,7 +530,8 @@ class X0 {
|
|||
57: var4,
|
||||
73: var7[-43],
|
||||
38: var0
|
||||
}).isNotEmpty ||
|
||||
})
|
||||
.isNotEmpty ||
|
||||
({
|
||||
67: var4,
|
||||
14: 'M\u{1f600}1HNbP',
|
||||
|
@ -539,7 +539,8 @@ class X0 {
|
|||
85: 'uyq',
|
||||
95: var7[(-(Int32x4.wwxw))],
|
||||
33: ''
|
||||
}).isNotEmpty))
|
||||
})
|
||||
.isNotEmpty))
|
||||
: false)
|
||||
? var2
|
||||
: (++var2))
|
||||
|
@ -558,7 +559,8 @@ class X0 {
|
|||
51: '-8ht',
|
||||
26: ('(2l3\u2665h' ?? var0),
|
||||
79: var4
|
||||
}).isNotEmpty
|
||||
})
|
||||
.isNotEmpty
|
||||
? var5[(var2 % loc0)]
|
||||
: var2) %
|
||||
((!(NetworkInterface.listSupported))
|
||||
|
@ -1005,9 +1007,9 @@ class X1 extends X0 {
|
|||
]);
|
||||
} finally {
|
||||
/**
|
||||
** Multi-line
|
||||
** documentation comment.
|
||||
*/
|
||||
** Multi-line
|
||||
** documentation comment.
|
||||
*/
|
||||
fld1_1 = (var5[var5[var2]]).isOdd;
|
||||
}
|
||||
/*
|
||||
|
@ -1206,7 +1208,7 @@ class X1 extends X0 {
|
|||
}
|
||||
|
||||
class X2 extends X0 with X1 {
|
||||
dynamic fld2_0 = {for (int loc0 = 0; loc0 < 60; loc0++) -56, 29};
|
||||
Set<int> fld2_0 = {for (int loc0 = 0; loc0 < 60; loc0++) -56, 29};
|
||||
|
||||
bool foo2_0(int par1) => var1;
|
||||
bool foo2_1(bool par1) {
|
||||
|
@ -1565,9 +1567,8 @@ class X2 extends X0 with X1 {
|
|||
}
|
||||
|
||||
class X3 extends X1 {
|
||||
dynamic fld3_0 = {
|
||||
if (true)
|
||||
if (false) 45: 'ynEn\u2665nG' else 70: 'c\u{1f600}mN4\u2665a',
|
||||
Map<int, String> fld3_0 = {
|
||||
if (true) if (false) 45: 'ynEn\u2665nG' else 70: 'c\u{1f600}mN4\u2665a',
|
||||
if (true) 30: '6\u2665P!Pbi',
|
||||
81: 't',
|
||||
82: '17fx#!',
|
||||
|
@ -1739,7 +1740,8 @@ class X3 extends X1 {
|
|||
7: par3,
|
||||
69: Uri.decodeFull(
|
||||
(foo1_3() + 'LX+'))
|
||||
}).isEmpty)
|
||||
})
|
||||
.isEmpty)
|
||||
? (~((13 | 64)))
|
||||
: (-(var2)))),
|
||||
(par1--),
|
||||
|
@ -1794,7 +1796,8 @@ class X3 extends X1 {
|
|||
4: 'pUc(q',
|
||||
15: 'K\u{1f600}hmdZ\u2665',
|
||||
95: (var1 ? var4 : (var1 ? fld3_0[-45] : foo1_3()))
|
||||
}).isNotEmpty
|
||||
})
|
||||
.isNotEmpty
|
||||
? ((var1 ? var1 : (var1 ? var1 : foo3_0(var3))) ||
|
||||
foo3_0(var3))
|
||||
: (!(((false || true) ? var1 : false))))
|
||||
|
@ -1992,7 +1995,8 @@ class X3 extends X1 {
|
|||
95: '\u{1f600}2tIYqE',
|
||||
43: (true ? 'baf-\u2665' : var4),
|
||||
30: var7[(-((-68 % ZLibOption.defaultLevel)))]
|
||||
})).isNotEmpty))
|
||||
}))
|
||||
.isNotEmpty))
|
||||
-13
|
||||
else
|
||||
(var1 ? (-((-(var5[56])))) : (var2--)),
|
||||
|
@ -2154,7 +2158,8 @@ class X3 extends X1 {
|
|||
? ((var2--) ?? fld3_2)
|
||||
: var5[(fld3_2--)])],
|
||||
52: '(('
|
||||
}).isEmpty)))
|
||||
})
|
||||
.isEmpty)))
|
||||
? fld3_0
|
||||
: {
|
||||
39: foo1_3(),
|
Loading…
Reference in a new issue