Skip to content

Commit

Permalink
Fix orphaned files in tests/language/ and tests/language_2/.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
munificent authored and commit-bot@chromium.org committed May 18, 2021
1 parent df5d0a5 commit 1989b7f
Show file tree
Hide file tree
Showing 53 changed files with 71 additions and 290 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ 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';
Expand Down
File renamed without changes.
File renamed without changes.
34 changes: 11 additions & 23 deletions tests/language/identifier/known_prefix_error_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,59 +15,55 @@ 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;
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 24, column 1, length 5]
// [error line 28, 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 30, column 1, length 5]
// [error line 33, 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 36, column 1, length 4]
// [error line 38, 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 42, column 1, length 2]
// [error line 43, 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 54, column 1, length 4]
// [error line 53, 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 60, column 1, length 4]
// [error line 58, 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 66, column 1, length 5]
// [error line 63, 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();
Expand Down Expand Up @@ -107,49 +103,41 @@ 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() {
Expand Down
10 changes: 0 additions & 10 deletions tests/language/library/a.dart

This file was deleted.

10 changes: 0 additions & 10 deletions tests/language/library/b.dart

This file was deleted.

8 changes: 0 additions & 8 deletions tests/language/library/c.dart

This file was deleted.

10 changes: 0 additions & 10 deletions tests/language/library/d.dart

This file was deleted.

11 changes: 0 additions & 11 deletions tests/language/library/e.dart

This file was deleted.

8 changes: 0 additions & 8 deletions tests/language/library/f.dart

This file was deleted.

8 changes: 0 additions & 8 deletions tests/language/library/library3.dart

This file was deleted.

11 changes: 0 additions & 11 deletions tests/language/library/library4.dart

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +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.


// 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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ void main() {
}
}
// ^
// [analyzer] undefined
// [cfe] undefined
// [analyzer] unspecified
// [cfe] unspecified
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Requirements=nnbd-weak


import 'infer_aliased_factory_invocation_06_lib.dart';
import 'infer_aliased_factory_invocation_07_lib.dart';

Type typeOf<X>() => X;

Expand Down
2 changes: 1 addition & 1 deletion tests/language/prefix/new_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
library PrefixTest;

import "package:expect/expect.dart";
import "test1.dart";
import "new_test1.dart";

main() {
Expect.equals(Prefix.getSource(), Prefix.getImport() + 1);
Expand Down
2 changes: 1 addition & 1 deletion tests/language/prefix/new_test1.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

library PrefixTest1;

import "test2.dart" as test2;
import "new_test2.dart" as test2;

class Prefix {
static const int foo = 43;
Expand Down
File renamed without changes.
7 changes: 0 additions & 7 deletions tests/language/script/source.dart

This file was deleted.

File renamed without changes.
7 changes: 0 additions & 7 deletions tests/language/top_level/file3.dart

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
File renamed without changes.

0 comments on commit 1989b7f

Please sign in to comment.