diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index e50e847c6..631855faa 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -79,16 +79,16 @@ jobs: if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'" working-directory: dwds job_003: - name: "analyzer_and_format; linux; Dart dev; PKGS: example, fixtures/_webdevSoundSmoke, frontend_server_client, frontend_server_common, test_common; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" + name: "analyzer_and_format; linux; Dart dev; PKGS: example, fixtures/_webdev_smoke, frontend_server_client, frontend_server_common, test_common; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:example-fixtures/_webdevSoundSmoke-frontend_server_client-frontend_server_common-test_common;commands:format-analyze_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:example-fixtures/_webdev_smoke-frontend_server_client-frontend_server_common-test_common;commands:format-analyze_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:example-fixtures/_webdevSoundSmoke-frontend_server_client-frontend_server_common-test_common + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:example-fixtures/_webdev_smoke-frontend_server_client-frontend_server_common-test_common os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -112,19 +112,19 @@ jobs: run: dart analyze --fatal-infos . if: "always() && steps.example_pub_upgrade.conclusion == 'success'" working-directory: example - - id: fixtures__webdevSoundSmoke_pub_upgrade - name: fixtures/_webdevSoundSmoke; dart pub upgrade + - id: fixtures__webdev_smoke_pub_upgrade + name: fixtures/_webdev_smoke; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: fixtures/_webdevSoundSmoke - - name: "fixtures/_webdevSoundSmoke; dart format --output=none --set-exit-if-changed ." + working-directory: fixtures/_webdev_smoke + - name: "fixtures/_webdev_smoke; dart format --output=none --set-exit-if-changed ." run: "dart format --output=none --set-exit-if-changed ." - if: "always() && steps.fixtures__webdevSoundSmoke_pub_upgrade.conclusion == 'success'" - working-directory: fixtures/_webdevSoundSmoke - - name: "fixtures/_webdevSoundSmoke; dart analyze --fatal-infos ." + if: "always() && steps.fixtures__webdev_smoke_pub_upgrade.conclusion == 'success'" + working-directory: fixtures/_webdev_smoke + - name: "fixtures/_webdev_smoke; dart analyze --fatal-infos ." run: dart analyze --fatal-infos . - if: "always() && steps.fixtures__webdevSoundSmoke_pub_upgrade.conclusion == 'success'" - working-directory: fixtures/_webdevSoundSmoke + if: "always() && steps.fixtures__webdev_smoke_pub_upgrade.conclusion == 'success'" + working-directory: fixtures/_webdev_smoke - id: frontend_server_client_pub_upgrade name: frontend_server_client; dart pub upgrade run: dart pub upgrade diff --git a/dwds/test/common/chrome_proxy_service_common.dart b/dwds/test/common/chrome_proxy_service_common.dart index 17eb5a0a0..3f8b26f6c 100644 --- a/dwds/test/common/chrome_proxy_service_common.dart +++ b/dwds/test/common/chrome_proxy_service_common.dart @@ -2067,7 +2067,7 @@ void runTests({ expect( resolvedUris.uris, containsAll([ - contains('/_testSound/example/hello_world/main.dart'), + contains('/_test/example/hello_world/main.dart'), contains('/lib/path.dart'), contains('/lib/src/path_set.dart'), ]), diff --git a/dwds/test/fixtures/project.dart b/dwds/test/fixtures/project.dart index 85c921f2d..8d83bdfdd 100644 --- a/dwds/test/fixtures/project.dart +++ b/dwds/test/fixtures/project.dart @@ -22,7 +22,7 @@ class TestProject { late Directory _fixturesCopy; /// The top level directory in which we run the test server, e.g. - /// "/tmp/_testSound". + /// "/tmp/_test". String get absolutePackageDirectory => p.join(_fixturesCopy.absolute.path, packageDirectory); @@ -39,7 +39,7 @@ class TestProject { } /// The path to the Dart entry file, e.g, - /// "/tmp/_testSound/example/hello_world/main.dart": + /// "/tmp/_test/example/hello_world/main.dart": String get dartEntryFilePath => p.joinAll([ _fixturesCopy.absolute.path, packageDirectory, @@ -61,8 +61,8 @@ class TestProject { TestProject.testPackage({IndexBaseMode baseMode = IndexBaseMode.noBase}) : this._( - packageName: '_test_package_sound', - packageDirectory: '_testPackageSound', + packageName: '_test_package', + packageDirectory: '_test_package', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: @@ -70,8 +70,8 @@ class TestProject { ); static final testCircular1 = TestProject._( - packageName: '_test_circular1_sound', - packageDirectory: '_testCircular1Sound', + packageName: '_test_circular1', + packageDirectory: '_test_circular1', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', @@ -79,8 +79,8 @@ class TestProject { TestProject.testCircular2({IndexBaseMode baseMode = IndexBaseMode.noBase}) : this._( - packageName: '_test_circular2_sound', - packageDirectory: '_testCircular2Sound', + packageName: '_test_circular2', + packageDirectory: '_test_circular2', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: @@ -88,32 +88,32 @@ class TestProject { ); static final test = TestProject._( - packageName: '_test_sound', - packageDirectory: '_testSound', + packageName: '_test', + packageDirectory: '_test', webAssetsPath: 'example/hello_world', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', ); static final testScopes = TestProject._( - packageName: '_test_sound', - packageDirectory: '_testSound', + packageName: '_test', + packageDirectory: '_test', webAssetsPath: webCompatiblePath(['example', 'scopes']), dartEntryFileName: 'main.dart', htmlEntryFileName: 'scopes.html', ); static final testAppendBody = TestProject._( - packageName: '_test_sound', - packageDirectory: '_testSound', + packageName: '_test', + packageDirectory: '_test', webAssetsPath: webCompatiblePath(['example', 'append_body']), dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', ); static final testExperiment = TestProject._( - packageName: '_experiment_sound', - packageDirectory: '_experimentSound', + packageName: '_experiment', + packageDirectory: '_experiment', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', @@ -121,7 +121,7 @@ class TestProject { static final testHotRestart1 = TestProject._( packageName: '_test_hot_restart1', - packageDirectory: '_testHotRestart1Sound', + packageDirectory: '_test_hot_restart1', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', @@ -131,7 +131,7 @@ class TestProject { /// order to test correctness when only a subset of libraries are updated. static final testHotRestart2 = TestProject._( packageName: '_test_hot_restart2', - packageDirectory: '_testHotRestart2Sound', + packageDirectory: '_test_hot_restart2', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', @@ -139,7 +139,7 @@ class TestProject { static final testHotRestartBreakpoints = TestProject._( packageName: '_test_hot_restart_breakpoints', - packageDirectory: '_testHotRestartBreakpoints', + packageDirectory: '_test_hot_restart_breakpoints', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', @@ -147,7 +147,7 @@ class TestProject { static final testHotReload = TestProject._( packageName: '_test_hot_reload', - packageDirectory: '_testHotReload', + packageDirectory: '_test_hot_reload', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', @@ -155,7 +155,7 @@ class TestProject { static final testHotReloadBreakpoints = TestProject._( packageName: '_test_hot_reload_breakpoints', - packageDirectory: '_testHotReloadBreakpoints', + packageDirectory: '_test_hot_reload_breakpoints', webAssetsPath: 'web', dartEntryFileName: 'main.dart', htmlEntryFileName: 'index.html', @@ -257,7 +257,7 @@ class TestProject { } /// The path to the Dart specified file in the 'lib' directory, e.g, - /// "/tmp/_testSound/lib/library.dart": + /// "/tmp/_test/lib/library.dart": String dartLibFilePath(String dartLibFileName) => p.joinAll([ _fixturesCopy.absolute.path, packageDirectory, diff --git a/dwds/test/load_strategy_test.dart b/dwds/test/load_strategy_test.dart index 8539526c8..bb104702e 100644 --- a/dwds/test/load_strategy_test.dart +++ b/dwds/test/load_strategy_test.dart @@ -36,7 +36,7 @@ void main() { test('defaults to "./dart_tool/package_config.json"', () { expect( p.split(strategy.packageConfigPath).join('/'), - endsWith('_testSound/.dart_tool/package_config.json'), + endsWith('_test/.dart_tool/package_config.json'), ); }); }, diff --git a/fixtures/_experimentSound/pubspec.yaml b/fixtures/_experiment/pubspec.yaml similarity index 91% rename from fixtures/_experimentSound/pubspec.yaml rename to fixtures/_experiment/pubspec.yaml index 7daad68a8..7b3f291e8 100644 --- a/fixtures/_experimentSound/pubspec.yaml +++ b/fixtures/_experiment/pubspec.yaml @@ -1,4 +1,4 @@ -name: _experiment_sound +name: _experiment version: 1.0.0 description: >- A fake package used for testing experimental language features. diff --git a/fixtures/_experimentSound/web/index.html b/fixtures/_experiment/web/index.html similarity index 100% rename from fixtures/_experimentSound/web/index.html rename to fixtures/_experiment/web/index.html diff --git a/fixtures/_experimentSound/web/main.dart b/fixtures/_experiment/web/main.dart similarity index 100% rename from fixtures/_experimentSound/web/main.dart rename to fixtures/_experiment/web/main.dart diff --git a/fixtures/_testCircular2Sound/web/index.html b/fixtures/_test/example/append_body/index.html similarity index 100% rename from fixtures/_testCircular2Sound/web/index.html rename to fixtures/_test/example/append_body/index.html diff --git a/fixtures/_testSound/example/append_body/main.dart b/fixtures/_test/example/append_body/main.dart similarity index 100% rename from fixtures/_testSound/example/append_body/main.dart rename to fixtures/_test/example/append_body/main.dart diff --git a/fixtures/_testSound/example/hello_world/index.html b/fixtures/_test/example/hello_world/index.html similarity index 100% rename from fixtures/_testSound/example/hello_world/index.html rename to fixtures/_test/example/hello_world/index.html diff --git a/fixtures/_testSound/example/hello_world/main.dart b/fixtures/_test/example/hello_world/main.dart similarity index 100% rename from fixtures/_testSound/example/hello_world/main.dart rename to fixtures/_test/example/hello_world/main.dart diff --git a/fixtures/_testSound/example/hello_world/part.dart b/fixtures/_test/example/hello_world/part.dart similarity index 100% rename from fixtures/_testSound/example/hello_world/part.dart rename to fixtures/_test/example/hello_world/part.dart diff --git a/fixtures/_testSound/example/scopes/main.dart b/fixtures/_test/example/scopes/main.dart similarity index 100% rename from fixtures/_testSound/example/scopes/main.dart rename to fixtures/_test/example/scopes/main.dart diff --git a/fixtures/_testSound/example/scopes/scopes.html b/fixtures/_test/example/scopes/scopes.html similarity index 100% rename from fixtures/_testSound/example/scopes/scopes.html rename to fixtures/_test/example/scopes/scopes.html diff --git a/fixtures/_testSound/lib/deferred_library.dart b/fixtures/_test/lib/deferred_library.dart similarity index 100% rename from fixtures/_testSound/lib/deferred_library.dart rename to fixtures/_test/lib/deferred_library.dart diff --git a/fixtures/_testSound/lib/library.dart b/fixtures/_test/lib/library.dart similarity index 100% rename from fixtures/_testSound/lib/library.dart rename to fixtures/_test/lib/library.dart diff --git a/fixtures/_testSound/pubspec.yaml b/fixtures/_test/pubspec.yaml similarity index 73% rename from fixtures/_testSound/pubspec.yaml rename to fixtures/_test/pubspec.yaml index 6d8808719..ab67e8f10 100644 --- a/fixtures/_testSound/pubspec.yaml +++ b/fixtures/_test/pubspec.yaml @@ -1,7 +1,7 @@ -name: _test_sound +name: _test version: 1.0.0 description: >- - A fake package used for testing sound null-safety. + A fake package used for testing. publish_to: none environment: diff --git a/fixtures/_testCircular2Sound/pubspec.yaml b/fixtures/_testCircular2Sound/pubspec.yaml deleted file mode 100644 index e9d936050..000000000 --- a/fixtures/_testCircular2Sound/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: _test_circular2_sound -version: 1.0.0 -description: >- - A fake package used for testing imports with sound null-safety with circular dependency. -publish_to: none - -environment: - sdk: ^3.2.0 - -dependencies: - _test_circular1_sound: - path: ../_testCircular1Sound - -dev_dependencies: - build_runner: ^2.5.0 - build_web_compilers: ^4.0.4 diff --git a/fixtures/_testCircular1Sound/lib/library1.dart b/fixtures/_test_circular1/lib/library1.dart similarity index 87% rename from fixtures/_testCircular1Sound/lib/library1.dart rename to fixtures/_test_circular1/lib/library1.dart index 3ed4b65bd..50449958b 100644 --- a/fixtures/_testCircular1Sound/lib/library1.dart +++ b/fixtures/_test_circular1/lib/library1.dart @@ -5,7 +5,7 @@ /// A library that we can import. library; -import 'package:_test_circular2_sound/library2.dart'; +import 'package:_test_circular2/library2.dart'; String concatenate(String a, String b) { return '$a$b'; // Breakpoint: Concatenate diff --git a/fixtures/_testCircular1Sound/pubspec.yaml b/fixtures/_test_circular1/pubspec.yaml similarity index 52% rename from fixtures/_testCircular1Sound/pubspec.yaml rename to fixtures/_test_circular1/pubspec.yaml index 156214727..6413db3af 100644 --- a/fixtures/_testCircular1Sound/pubspec.yaml +++ b/fixtures/_test_circular1/pubspec.yaml @@ -1,7 +1,7 @@ -name: _test_circular1_sound +name: _test_circular1 version: 1.0.0 description: >- - A fake package used for testing imports with sound null-safety with circular dependency. + A fake package used for testing imports with circular dependency. publish_to: none environment: @@ -10,8 +10,8 @@ environment: dependencies: intl: ^0.17.0 path: ^1.6.1 - _test_circular2_sound: - path: ../_testCircular2Sound + _test_circular2: + path: ../_test_circular2 dev_dependencies: build_runner: ^2.5.0 diff --git a/fixtures/_testCircular2Sound/lib/library2.dart b/fixtures/_test_circular2/lib/library2.dart similarity index 86% rename from fixtures/_testCircular2Sound/lib/library2.dart rename to fixtures/_test_circular2/lib/library2.dart index 8ce9e67ec..c62a979fb 100644 --- a/fixtures/_testCircular2Sound/lib/library2.dart +++ b/fixtures/_test_circular2/lib/library2.dart @@ -2,7 +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. -import 'package:_test_circular1_sound/library1.dart'; +import 'package:_test_circular1/library1.dart'; int globalValue = 0; diff --git a/fixtures/_testPackageSound/pubspec.yaml b/fixtures/_test_circular2/pubspec.yaml similarity index 52% rename from fixtures/_testPackageSound/pubspec.yaml rename to fixtures/_test_circular2/pubspec.yaml index 53ef4fcb4..3597e10ac 100644 --- a/fixtures/_testPackageSound/pubspec.yaml +++ b/fixtures/_test_circular2/pubspec.yaml @@ -1,15 +1,15 @@ -name: _test_package_sound +name: _test_circular2 version: 1.0.0 description: >- - A fake package used for testing imports with sound null-safety. Imports _test. + A fake package used for testing imports with circular dependency. publish_to: none environment: sdk: ^3.2.0 dependencies: - _test_sound: - path: ../_testSound + _test_circular1: + path: ../_test_circular1 dev_dependencies: build_runner: ^2.5.0 diff --git a/fixtures/_testCircular2Sound/web/base_index.html b/fixtures/_test_circular2/web/base_index.html similarity index 100% rename from fixtures/_testCircular2Sound/web/base_index.html rename to fixtures/_test_circular2/web/base_index.html diff --git a/fixtures/_testHotReload/web/index.html b/fixtures/_test_circular2/web/index.html similarity index 100% rename from fixtures/_testHotReload/web/index.html rename to fixtures/_test_circular2/web/index.html diff --git a/fixtures/_testCircular2Sound/web/main.dart b/fixtures/_test_circular2/web/main.dart similarity index 84% rename from fixtures/_testCircular2Sound/web/main.dart rename to fixtures/_test_circular2/web/main.dart index 9c4b46056..2e5728ae4 100644 --- a/fixtures/_testCircular2Sound/web/main.dart +++ b/fixtures/_test_circular2/web/main.dart @@ -8,8 +8,8 @@ import 'dart:core'; // ignore: deprecated_member_use import 'dart:html'; -import 'package:_test_circular1_sound/library1.dart'; -import 'package:_test_circular2_sound/library2.dart'; +import 'package:_test_circular1/library1.dart'; +import 'package:_test_circular2/library2.dart'; void main() { // For setting breakpoints. diff --git a/fixtures/_testHotReload/lib/library1.dart b/fixtures/_test_hot_reload/lib/library1.dart similarity index 100% rename from fixtures/_testHotReload/lib/library1.dart rename to fixtures/_test_hot_reload/lib/library1.dart diff --git a/fixtures/_testHotReload/pubspec.yaml b/fixtures/_test_hot_reload/pubspec.yaml similarity index 100% rename from fixtures/_testHotReload/pubspec.yaml rename to fixtures/_test_hot_reload/pubspec.yaml diff --git a/fixtures/_testHotReloadBreakpoints/web/index.html b/fixtures/_test_hot_reload/web/index.html similarity index 100% rename from fixtures/_testHotReloadBreakpoints/web/index.html rename to fixtures/_test_hot_reload/web/index.html diff --git a/fixtures/_testHotReload/web/main.dart b/fixtures/_test_hot_reload/web/main.dart similarity index 100% rename from fixtures/_testHotReload/web/main.dart rename to fixtures/_test_hot_reload/web/main.dart diff --git a/fixtures/_testHotReloadBreakpoints/pubspec.yaml b/fixtures/_test_hot_reload_breakpoints/pubspec.yaml similarity index 100% rename from fixtures/_testHotReloadBreakpoints/pubspec.yaml rename to fixtures/_test_hot_reload_breakpoints/pubspec.yaml diff --git a/fixtures/_testHotRestart2Sound/web/index.html b/fixtures/_test_hot_reload_breakpoints/web/index.html similarity index 100% rename from fixtures/_testHotRestart2Sound/web/index.html rename to fixtures/_test_hot_reload_breakpoints/web/index.html diff --git a/fixtures/_testHotReloadBreakpoints/web/main.dart b/fixtures/_test_hot_reload_breakpoints/web/main.dart similarity index 100% rename from fixtures/_testHotReloadBreakpoints/web/main.dart rename to fixtures/_test_hot_reload_breakpoints/web/main.dart diff --git a/fixtures/_testHotRestart1Sound/lib/library1.dart b/fixtures/_test_hot_restart1/lib/library1.dart similarity index 100% rename from fixtures/_testHotRestart1Sound/lib/library1.dart rename to fixtures/_test_hot_restart1/lib/library1.dart diff --git a/fixtures/_testHotRestart1Sound/pubspec.yaml b/fixtures/_test_hot_restart1/pubspec.yaml similarity index 100% rename from fixtures/_testHotRestart1Sound/pubspec.yaml rename to fixtures/_test_hot_restart1/pubspec.yaml diff --git a/fixtures/_testHotRestart2Sound/lib/library2.dart b/fixtures/_test_hot_restart2/lib/library2.dart similarity index 100% rename from fixtures/_testHotRestart2Sound/lib/library2.dart rename to fixtures/_test_hot_restart2/lib/library2.dart diff --git a/fixtures/_testHotRestart2Sound/pubspec.yaml b/fixtures/_test_hot_restart2/pubspec.yaml similarity index 89% rename from fixtures/_testHotRestart2Sound/pubspec.yaml rename to fixtures/_test_hot_restart2/pubspec.yaml index 47015e83f..ae2590657 100644 --- a/fixtures/_testHotRestart2Sound/pubspec.yaml +++ b/fixtures/_test_hot_restart2/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: intl: ^0.17.0 path: ^1.6.1 _test_hot_restart1: - path: ../_testHotRestart1Sound + path: ../_test_hot_restart1 dev_dependencies: build_runner: ^2.5.0 diff --git a/fixtures/_testHotRestart2Sound/web/base_index.html b/fixtures/_test_hot_restart2/web/base_index.html similarity index 100% rename from fixtures/_testHotRestart2Sound/web/base_index.html rename to fixtures/_test_hot_restart2/web/base_index.html diff --git a/fixtures/_testHotRestartBreakpoints/web/index.html b/fixtures/_test_hot_restart2/web/index.html similarity index 100% rename from fixtures/_testHotRestartBreakpoints/web/index.html rename to fixtures/_test_hot_restart2/web/index.html diff --git a/fixtures/_testHotRestart2Sound/web/main.dart b/fixtures/_test_hot_restart2/web/main.dart similarity index 100% rename from fixtures/_testHotRestart2Sound/web/main.dart rename to fixtures/_test_hot_restart2/web/main.dart diff --git a/fixtures/_testHotRestartBreakpoints/pubspec.yaml b/fixtures/_test_hot_restart_breakpoints/pubspec.yaml similarity index 100% rename from fixtures/_testHotRestartBreakpoints/pubspec.yaml rename to fixtures/_test_hot_restart_breakpoints/pubspec.yaml diff --git a/fixtures/_testPackageSound/web/index.html b/fixtures/_test_hot_restart_breakpoints/web/index.html similarity index 100% rename from fixtures/_testPackageSound/web/index.html rename to fixtures/_test_hot_restart_breakpoints/web/index.html diff --git a/fixtures/_testHotRestartBreakpoints/web/main.dart b/fixtures/_test_hot_restart_breakpoints/web/main.dart similarity index 100% rename from fixtures/_testHotRestartBreakpoints/web/main.dart rename to fixtures/_test_hot_restart_breakpoints/web/main.dart diff --git a/fixtures/_testPackageSound/lib/src/test_part.dart b/fixtures/_test_package/lib/src/test_part.dart similarity index 100% rename from fixtures/_testPackageSound/lib/src/test_part.dart rename to fixtures/_test_package/lib/src/test_part.dart diff --git a/fixtures/_testPackageSound/lib/src/version.dart b/fixtures/_test_package/lib/src/version.dart similarity index 100% rename from fixtures/_testPackageSound/lib/src/version.dart rename to fixtures/_test_package/lib/src/version.dart diff --git a/fixtures/_testPackageSound/lib/test_library.dart b/fixtures/_test_package/lib/test_library.dart similarity index 100% rename from fixtures/_testPackageSound/lib/test_library.dart rename to fixtures/_test_package/lib/test_library.dart diff --git a/fixtures/_test_package/pubspec.yaml b/fixtures/_test_package/pubspec.yaml new file mode 100644 index 000000000..12cdd3219 --- /dev/null +++ b/fixtures/_test_package/pubspec.yaml @@ -0,0 +1,16 @@ +name: _test_package +version: 1.0.0 +description: >- + A fake package used for testing imports. Imports _test. +publish_to: none + +environment: + sdk: ^3.2.0 + +dependencies: + _test: + path: ../_test + +dev_dependencies: + build_runner: ^2.5.0 + build_web_compilers: ^4.0.4 diff --git a/fixtures/_testPackageSound/web/base_index.html b/fixtures/_test_package/web/base_index.html similarity index 100% rename from fixtures/_testPackageSound/web/base_index.html rename to fixtures/_test_package/web/base_index.html diff --git a/fixtures/_testSound/example/append_body/index.html b/fixtures/_test_package/web/index.html similarity index 100% rename from fixtures/_testSound/example/append_body/index.html rename to fixtures/_test_package/web/index.html diff --git a/fixtures/_testPackageSound/web/main.dart b/fixtures/_test_package/web/main.dart similarity index 97% rename from fixtures/_testPackageSound/web/main.dart rename to fixtures/_test_package/web/main.dart index 96f3785a5..a5c1a1205 100644 --- a/fixtures/_testPackageSound/web/main.dart +++ b/fixtures/_test_package/web/main.dart @@ -10,9 +10,9 @@ import 'dart:developer'; // ignore: deprecated_member_use import 'dart:html'; -import 'package:_test_package_sound/test_library.dart'; -import 'package:_test_sound/deferred_library.dart' deferred as d; -import 'package:_test_sound/library.dart'; +import 'package:_test_package/test_library.dart'; +import 'package:_test/deferred_library.dart' deferred as d; +import 'package:_test/library.dart'; extension NumberParsing on String { int parseInt() { diff --git a/fixtures/_webdevSoundSmoke/build.yaml b/fixtures/_webdev_smoke/build.yaml similarity index 100% rename from fixtures/_webdevSoundSmoke/build.yaml rename to fixtures/_webdev_smoke/build.yaml diff --git a/fixtures/_webdevSoundSmoke/canary_build.yaml b/fixtures/_webdev_smoke/canary_build.yaml similarity index 100% rename from fixtures/_webdevSoundSmoke/canary_build.yaml rename to fixtures/_webdev_smoke/canary_build.yaml diff --git a/fixtures/_webdevSoundSmoke/localhost+2-key.pem b/fixtures/_webdev_smoke/localhost+2-key.pem similarity index 100% rename from fixtures/_webdevSoundSmoke/localhost+2-key.pem rename to fixtures/_webdev_smoke/localhost+2-key.pem diff --git a/fixtures/_webdevSoundSmoke/localhost+2.pem b/fixtures/_webdev_smoke/localhost+2.pem similarity index 100% rename from fixtures/_webdevSoundSmoke/localhost+2.pem rename to fixtures/_webdev_smoke/localhost+2.pem diff --git a/fixtures/_webdevSoundSmoke/mono_pkg.yaml b/fixtures/_webdev_smoke/mono_pkg.yaml similarity index 100% rename from fixtures/_webdevSoundSmoke/mono_pkg.yaml rename to fixtures/_webdev_smoke/mono_pkg.yaml diff --git a/fixtures/_webdevSoundSmoke/pubspec.yaml b/fixtures/_webdev_smoke/pubspec.yaml similarity index 55% rename from fixtures/_webdevSoundSmoke/pubspec.yaml rename to fixtures/_webdev_smoke/pubspec.yaml index 123d60f15..d25c304a4 100644 --- a/fixtures/_webdevSoundSmoke/pubspec.yaml +++ b/fixtures/_webdev_smoke/pubspec.yaml @@ -1,5 +1,5 @@ -name: _webdev_sound_smoke -description: A test fixture for webdev testing with sound support. +name: _webdev_smoke +description: A test fixture for webdev testing. publish_to: none diff --git a/fixtures/_webdevSoundSmoke/web/index.html b/fixtures/_webdev_smoke/web/index.html similarity index 100% rename from fixtures/_webdevSoundSmoke/web/index.html rename to fixtures/_webdev_smoke/web/index.html diff --git a/fixtures/_webdevSoundSmoke/web/main.dart b/fixtures/_webdev_smoke/web/main.dart similarity index 100% rename from fixtures/_webdevSoundSmoke/web/main.dart rename to fixtures/_webdev_smoke/web/main.dart diff --git a/fixtures/_webdevSoundSmoke/web/scopes.html b/fixtures/_webdev_smoke/web/scopes.html similarity index 100% rename from fixtures/_webdevSoundSmoke/web/scopes.html rename to fixtures/_webdev_smoke/web/scopes.html diff --git a/fixtures/_webdevSoundSmoke/web/scopes_main.dart b/fixtures/_webdev_smoke/web/scopes_main.dart similarity index 100% rename from fixtures/_webdevSoundSmoke/web/scopes_main.dart rename to fixtures/_webdev_smoke/web/scopes_main.dart diff --git a/webdev/test/e2e_test.dart b/webdev/test/e2e_test.dart index 87c07f74d..b55795e38 100644 --- a/webdev/test/e2e_test.dart +++ b/webdev/test/e2e_test.dart @@ -41,31 +41,30 @@ void main() { const debug = false; final testRunner = TestRunner(); - late String soundExampleDirectory; + late String exampleDirectory; setUpAll(() async { configureLogWriter(debug); await testRunner.setUpAll(); - soundExampleDirectory = - p.absolute(p.join(p.current, '..', 'fixtures', '_webdevSoundSmoke')); + exampleDirectory = + p.absolute(p.join(p.current, '..', 'fixtures', '_webdev_smoke')); final process = await TestProcess.start(dartPath, ['pub', 'upgrade'], - workingDirectory: soundExampleDirectory, - environment: getPubEnvironment()); + workingDirectory: exampleDirectory, environment: getPubEnvironment()); await process.shouldExit(0); await d .file('.dart_tool/package_config.json', isNotEmpty) - .validate(soundExampleDirectory); - await d.file('pubspec.lock', isNotEmpty).validate(soundExampleDirectory); + .validate(exampleDirectory); + await d.file('pubspec.lock', isNotEmpty).validate(exampleDirectory); }); tearDownAll(testRunner.tearDownAll); test('smoke test is configured properly', () async { - final smokeYaml = loadYaml( - await File('$soundExampleDirectory/pubspec.yaml').readAsString()) - as YamlMap; + final smokeYaml = + loadYaml(await File('$exampleDirectory/pubspec.yaml').readAsString()) + as YamlMap; final webdevYaml = loadYaml(await File('pubspec.yaml').readAsString()) as YamlMap; expect(smokeYaml['environment']['sdk'], @@ -83,8 +82,8 @@ void main() { final args = ['build', '-o', 'web:${d.sandbox}']; - final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + final process = + await testRunner.runWebDev(args, workingDirectory: exampleDirectory); // NOTE: We'd like this to be more useful // See https://github.com/dart-lang/build/issues/1283 @@ -111,8 +110,8 @@ void main() { '--delete-conflicting-outputs' ]; - final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + final process = + await testRunner.runWebDev(args, workingDirectory: exampleDirectory); await checkProcessStdout(process, ['Built with build_runner']); await process.shouldExit(0); @@ -132,7 +131,7 @@ void main() { } final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + workingDirectory: exampleDirectory); final expectedItems = ['Built with build_runner']; @@ -165,7 +164,7 @@ void main() { ]; final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + workingDirectory: exampleDirectory); final expectedItems = ['Built with build_runner']; @@ -188,14 +187,14 @@ void main() { } final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + workingDirectory: exampleDirectory); final expectedItems = ['Built with build_runner']; await checkProcessStdout(process, expectedItems); await process.shouldExit(0); - await d.nothing('build').validate(soundExampleDirectory); + await d.nothing('build').validate(exampleDirectory); }); } }); @@ -211,7 +210,7 @@ void main() { } final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + workingDirectory: exampleDirectory); final hostUrl = 'http://localhost:$openPort'; @@ -254,7 +253,7 @@ void main() { ]; final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + workingDirectory: exampleDirectory); await expectLater( process.stdout, emitsThrough(contains( @@ -285,7 +284,7 @@ void main() { '--verbose', ]; final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + workingDirectory: exampleDirectory); VmService? vmService; process.stdoutStream().listen(Logger.root.fine); @@ -322,10 +321,10 @@ void main() { await stream.firstWhere( (Event event) => event.kind == EventKind.kPauseBreakpoint); - final isNullSafetyEnabled = + final expression = '() { const sound = !([] is List); return sound; } ()'; - final result = await vmService.evaluateInFrame( - isolateId, 0, isNullSafetyEnabled); + final result = + await vmService.evaluateInFrame(isolateId, 0, expression); expect( result, @@ -350,7 +349,7 @@ void main() { '--verbose', ]; final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + workingDirectory: exampleDirectory); process.stdoutStream().listen(Logger.root.fine); process.stderrStream().listen(Logger.root.warning); @@ -410,7 +409,7 @@ void main() { '--verbose', ]; final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + workingDirectory: exampleDirectory); process.stdoutStream().listen(Logger.root.fine); process.stderrStream().listen(Logger.root.warning); @@ -481,7 +480,7 @@ void main() { '--verbose', ]; final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + workingDirectory: exampleDirectory); VmService? vmService; try { @@ -535,7 +534,7 @@ void main() { '--verbose', ]; final process = await testRunner.runWebDev(args, - workingDirectory: soundExampleDirectory); + workingDirectory: exampleDirectory); VmService? vmService; try { diff --git a/webdev/test/test_utils.dart b/webdev/test/test_utils.dart index 5f5f64af2..b972667b9 100644 --- a/webdev/test/test_utils.dart +++ b/webdev/test/test_utils.dart @@ -46,7 +46,7 @@ class TestRunner { Future prepareWorkspace() async { final exampleDirectory = - p.absolute(p.join(p.current, '..', 'fixtures', '_webdevSoundSmoke')); + p.absolute(p.join(p.current, '..', 'fixtures', '_webdev_smoke')); final process = await TestProcess.start( sdkLayout.dartPath, ['pub', 'upgrade'], diff --git a/webdev/test/tls_test.dart b/webdev/test/tls_test.dart index 1b580c65d..6ad6b332c 100644 --- a/webdev/test/tls_test.dart +++ b/webdev/test/tls_test.dart @@ -28,7 +28,7 @@ void main() { configureLogWriter(debug); await testRunner.setUpAll(); exampleDirectory = - p.absolute(p.join(p.current, '..', 'fixtures', '_webdevSoundSmoke')); + p.absolute(p.join(p.current, '..', 'fixtures', '_webdev_smoke')); final process = await TestProcess.start( 'dart',